数组:68
字符串:23
哈希表:23
排序:18
动态规划:17
数学:14
二分查找:13
矩阵:11
贪心:11
滑动窗口:9
双指针:8
模拟:8
前缀和:7
枚举:7
回溯:6
位运算:6
计数:6
深度优先搜索:5
堆(优先队列):5
图:5
栈:4
广度优先搜索:3
记忆化搜索:3
有序集合:3
数论:3
设计:2
树:2
队列:2
组合数学:2
单调栈:1
字典树:1
状态压缩:1
并查集:1
链表:1
树状数组:1
线段树:1
id | title | difficulty | solution |
---|---|---|---|
51 | N 皇后 | hard | n-queens |
52 | N 皇后 II | hard | n-queens-ii |
419 | 甲板上的战舰 | medium | battleships-in-a-board |
494 | 目标和 | medium | target-sum |
503 | 下一个更大元素 II | medium | next-greater-element-ii |
520 | 检测大写字母 | easy | detect-capital |
521 | 最长特殊序列 Ⅰ | easy | longest-uncommon-subsequence-i |
522 | 最长特殊序列 II | medium | longest-uncommon-subsequence-ii |
540 | 有序数组中的单一元素 | medium | single-element-in-a-sorted-array |
551 | 学生出勤记录 I | easy | student-attendance-record-i |
552 | 学生出勤记录 II | hard | student-attendance-record-ii |
632 | 最小区间 | hard | smallest-range-covering-elements-from-k-lists |
661 | 图片平滑器 | easy | image-smoother |
676 | 实现一个魔法字典 | medium | implement-magic-dictionary |
690 | 员工的重要性 | medium | employee-importance |
698 | 划分为k个相等的子集 | medium | partition-to-k-equal-sum-subsets |
721 | 账户合并 | medium | accounts-merge |
825 | 适龄的朋友 | medium | friends-of-appropriate-ages |
935 | 骑士拨号器 | medium | knight-dialer |
977 | 有序数组的平方 | easy | squares-of-a-sorted-array |
997 | 找到小镇的法官 | easy | find-the-town-judge |
999 | 可以被一步捕获的棋子数 | easy | available-captures-for-rook |
1014 | 最佳观光组合 | medium | best-sightseeing-pair |
1035 | 不相交的线 | medium | uncrossed-lines |
1184 | 公交站间的距离 | easy | distance-between-bus-stops |
1338 | 数组大小减半 | medium | reduce-array-size-to-the-half |
1450 | 在既定时间做作业的学生人数 | easy | number-of-students-doing-homework-at-a-given-time |
1812 | 判断国际象棋棋盘中一个格子的颜色 | easy | determine-color-of-a-chessboard-square |
1847 | 最近的房间 | hard | closest-room |
2024 | 考试的最大困扰度 | medium | maximize-the-confusion-of-an-exam |
2065 | 最大化一张图中的路径价值 | hard | maximum-path-quality-of-a-graph |
2181 | 合并零之间的节点 | medium | merge-nodes-in-between-zeros |
2288 | 价格减免 | medium | apply-discount-to-prices |
2332 | 坐上公交的最晚时间 | medium | the-latest-time-to-catch-a-bus |
2374 | 边积分最高的节点 | medium | node-with-highest-edge-score |
2376 | 统计特殊整数 | hard | count-special-integers |
2390 | 从字符串中移除星号 | medium | removing-stars-from-a-string |
2398 | 预算内的最多机器人数目 | hard | maximum-number-of-robots-within-budget |
2414 | 最长的字母序连续子字符串的长度 | medium | length-of-the-longest-alphabetical-continuous-substring |
2552 | 统计上升四元组 | hard | count-increasing-quadruplets |
2555 | 两个线段获得的最多奖品 | medium | maximize-win-from-two-segments |
2576 | 求出最多标记下标 | medium | find-the-maximum-number-of-marked-indices |
2634 | 过滤数组中的元素 | easy | filter-elements-from-array |
2663 | 字典序最小的美丽字符串 | hard | lexicographically-smallest-beautiful-string |
2708 | 一个小组的最大实力值 | medium | maximum-strength-of-a-group |
2710 | 移除字符串中的尾随零 | easy | remove-trailing-zeros-from-a-string |
2713 | 矩阵中严格递增的单元格数 | hard | maximum-strictly-increasing-cells-in-a-matrix |
2717 | 半有序排列 | easy | semi-ordered-permutation |
2732 | 找到矩阵中的好子集 | hard | find-a-good-subset-of-the-matrix |
2734 | 执行子串操作后的字典序最小字符串 | medium | lexicographically-smallest-string-after-substring-operation |
2740 | 找出分区值 | medium | find-the-value-of-the-partition |
2742 | 给墙壁刷油漆 | hard | painting-the-walls |
2748 | 美丽下标对的数目 | easy | number-of-beautiful-pairs |
2779 | 数组的最大美丽值 | medium | maximum-beauty-of-an-array-after-applying-operation |
2786 | 访问数组中的位置使分数最大 | medium | visit-array-positions-to-maximize-score |
2806 | 取整购买后的账户余额 | easy | account-balance-after-rounded-purchase |
2813 | 子序列最大优雅度 | hard | maximum-elegance-of-a-k-length-subsequence |
2844 | 生成特殊数字的最少操作 | medium | minimum-operations-to-make-a-special-number |
2848 | 与车相交的点 | easy | points-that-intersect-with-cars |
2860 | 让所有学生保持开心的分组方法数 | medium | happy-students |
2956 | 找到两个数组中的公共元素 | easy | find-common-elements-between-two-arrays |
3001 | 捕获黑皇后需要的最少移动次数 | medium | minimum-moves-to-capture-the-queen |
3096 | 得到更多分数的最少关卡数目 | medium | minimum-levels-to-gain-more-points |
3099 | 哈沙德数 | easy | harshad-number |
3111 | 覆盖所有点的最少矩形数目 | medium | minimum-rectangles-to-cover-points |
3115 | 质数的最大距离 | medium | maximum-prime-difference |
3117 | 划分数组得到最小的值之和 | hard | minimum-sum-of-values-by-dividing-array |
3127 | 构造相同颜色的正方形 | easy | make-a-square-with-the-same-color |
3128 | 直角三角形 | medium | right-triangles |
3132 | 找出与数组相加的整数 II | medium | find-the-integer-added-to-array-ii |
3133 | 数组最后一个元素的最小值 | medium | minimum-array-end |
3137 | K 周期字符串需要的最少操作次数 | medium | minimum-number-of-operations-to-make-word-k-periodic |
3138 | 同位字符串连接的最小长度 | medium | minimum-length-of-anagram-concatenation |
3142 | 判断矩阵是否满足条件 | easy | check-if-grid-satisfies-conditions |
3146 | 两个字符串的排列差 | easy | permutation-difference-between-two-strings |
3148 | 矩阵中的最大得分 | medium | maximum-difference-score-in-a-grid |
3151 | 特殊数组 I | easy | special-array-i |
3152 | 特殊数组 II | medium | special-array-ii |
3153 | 所有数对中数位差之和 | medium | sum-of-digit-differences-of-all-pairs |
3154 | 到达第 K 级台阶的方案数 | hard | find-number-of-ways-to-reach-the-k-th-stair |
3174 | 清除数字 | easy | clear-digits |
3176 | 求出最长好子序列 I | medium | find-the-maximum-length-of-a-good-subsequence-i |
3177 | 求出最长好子序列 II | hard | find-the-maximum-length-of-a-good-subsequence-ii |
3206 | 交替组 I | easy | alternating-groups-i |
3208 | 交替组 II | medium | alternating-groups-ii |
3233 | 统计不是特殊数字的数字数量 | medium | find-the-count-of-numbers-which-are-not-special |
3238 | 求出胜利玩家的数目 | easy | find-the-number-of-winning-players |
3239 | 最少翻转次数使二进制矩阵回文 I | medium | minimum-number-of-flips-to-make-binary-grid-palindromic-i |
3240 | 最少翻转次数使二进制矩阵回文 II | medium | minimum-number-of-flips-to-make-binary-grid-palindromic-ii |
3242 | 设计相邻元素求和服务 | easy | design-neighbor-sum-service |
3243 | 新增道路查询后的最短距离 I | medium | shortest-distance-after-road-addition-queries-i |
3244 | 新增道路查询后的最短距离 II | hard | shortest-distance-after-road-addition-queries-ii |
3248 | 矩阵中的蛇 | easy | snake-in-matrix |
3249 | 统计好节点的数目 | medium | count-the-number-of-good-nodes |
3258 | 统计满足 K 约束的子字符串数量 I | easy | count-substrings-that-satisfy-k-constraint-i |
3261 | 统计满足 K 约束的子字符串数量 II | hard | count-substrings-that-satisfy-k-constraint-ii |
3264 | K 次乘运算后的最终数组 I | easy | final-array-state-after-k-multiplication-operations-i |
3274 | 检查棋盘方格颜色是否相同 | easy | check-if-two-chessboard-squares-have-the-same-color |
LCP 40 | 心算挑战 | easy | uOAnQW |
LCP 61 | 气温变化趋势 | easy | 6CE719 |