Skip to content
On this page

字符串

数组

链表

二叉树

动态规划

回溯算法

贪心算法

DFS 遍历

leetcode top 100

题目出现次数链接
✅ 3. 无重复字符的最长子串18https://leetcode-cn.com/problems/longest-substring-without-repeating-characters
✅ 88. 合并两个有序数组17https://leetcode-cn.com/problems/merge-sorted-array
✅ 129. 求根到叶子节点数字之和15https://leetcode-cn.com/problems/sum-root-to-leaf-numbers
✅ 112. 路径总和13https://leetcode-cn.com/problems/path-sum
✅ 53. 最大子序和12https://leetcode-cn.com/problems/maximum-subarray
✅ 1. 两数之和11https://leetcode-cn.com/problems/two-sum
✅ 165. 比较版本号11https://leetcode-cn.com/problems/compare-version-numbers
215. 数组中的第 K 个最大元素10https://leetcode-cn.com/problems/kth-largest-element-in-an-array
✅ 209. 长度最小的子数组8https://leetcode-cn.com/problems/minimum-size-subarray-sum
✅ 剑指 Offer 22. 链表中倒数第 k 个节点8https://leetcode-cn.com/problems/lian-biao-zhong-dao-shu-di-kge-jie-dian-lcof
✅ 415. 字符串相加8https://leetcode-cn.com/problems/add-strings
✅ 46. 全排列8https://leetcode-cn.com/problems/permutations
✅ 206. 反转链表7https://leetcode-cn.com/problems/reverse-linked-list
✅ 102. 二叉树的层序遍历6https://leetcode-cn.com/problems/binary-tree-level-order-traversal
✅ 70. 爬楼梯6https://leetcode-cn.com/problems/climbing-stairs
✅ 54. 螺旋矩阵6https://leetcode-cn.com/problems/spiral-matrix
✅ 93. 复原 IP 地址5https://leetcode-cn.com/problems/restore-ip-addresses
✅ 200. 岛屿数量5https://leetcode-cn.com/problems/number-of-islands
✅ 230. 二叉搜索树中第 K 小的元素5https://leetcode-cn.com/problems/kth-smallest-element-in-a-bst
✅ 15. 三数之和5https://leetcode-cn.com/problems/3sum
✅ 141. 环形链表5https://leetcode-cn.com/problems/linked-list-cycle
✅ 429. N 叉树的层序遍历5https://leetcode-cn.com/problems/n-ary-tree-level-order-traversal
✅ 226. 翻转二叉树4https://leetcode-cn.com/problems/invert-binary-tree
✅ 121. 买卖股票的最佳时机4https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock
✅ 718. 最长重复子数组4https://leetcode-cn.com/problems/maximum-length-of-repeated-subarray
✅ 160. 相交链表4https://leetcode-cn.com/problems/intersection-of-two-linked-lists
✅ 695. 岛屿的最大面积4https://leetcode-cn.com/problems/max-area-of-island
✅ 62. 不同路径4https://leetcode-cn.com/problems/unique-paths
剑指 Offer 62. 圆圈中最后剩下的数字4https://leetcode-cn.com/problems/yuan-quan-zhong-zui-hou-sheng-xia-de-shu-zi-lcof
✅ 94. 二叉树的中序遍历3https://leetcode-cn.com/problems/binary-tree-inorder-traversal
✅ 104. 二叉树的最大深度3https://leetcode-cn.com/problems/maximum-depth-of-binary-tree
✅ 21. 合并两个有序链表3https://leetcode-cn.com/problems/merge-two-sorted-lists
✅ 509. 斐波那契数3https://leetcode-cn.com/problems/fibonacci-number
✅ 113. 路径总和 II3https://leetcode-cn.com/problems/path-sum-ii
✅ 468. 验证 IP 地址3https://leetcode-cn.com/problems/validate-ip-address
✅ 31. 下一个排列3https://leetcode-cn.com/problems/next-permutation
✅ 20. 有效的括号3https://leetcode-cn.com/problems/valid-parentheses
✅ 349. 两个数组的交集3https://leetcode-cn.com/problems/intersection-of-two-arrays
✅ 5. 最长回文子串3https://leetcode-cn.com/problems/longest-palindromic-substring
✅ 236. 二叉树的最近公共祖先3https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree
✅ 146. LRU 缓存机制3https://leetcode-cn.com/problems/lru-cache
✅ 322. 零钱兑换2https://leetcode-cn.com/problems/coin-change
394. 字符串解码2https://leetcode-cn.com/problems/decode-string
✅ 19. 删除链表的倒数第 N 个节点2https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list
✅ 剑指 Offer 24. 反转链表2https://leetcode-cn.com/problems/fan-zhuan-lian-biao-lcof
✅ 42. 接雨水2https://leetcode-cn.com/problems/trapping-rain-water
155. 最小栈2https://leetcode-cn.com/problems/min-stack
169. 多数元素2https://leetcode-cn.com/problems/majority-element
剑指 Offer 21. 调整数组顺序使奇数位于偶数前面2https://leetcode-cn.com/problems/diao-zheng-shu-zu-shun-xu-shi-qi-shu-wei-yu-ou-shu-qian-mian-lcof
67. 二进制求和2https://leetcode-cn.com/problems/add-binary
144. 二叉树的前序遍历2https://leetcode-cn.com/problems/binary-tree-preorder-traversal
198. 打家劫舍2https://leetcode-cn.com/problems/house-robber
14. 最长公共前缀2https://leetcode-cn.com/problems/longest-common-prefix
补充题 3. 求区间最小数乘区间和的最大值2https://mp.weixin.qq.com/s/UFv7pt_djjZoK_gzUBrRXA
199. 二叉树的右视图2https://leetcode-cn.com/problems/binary-tree-right-side-view
剑指 Offer 09. 用两个栈实现队列2https://leetcode-cn.com/problems/yong-liang-ge-zhan-shi-xian-dui-lie-lcof
56. 合并区间2https://leetcode-cn.com/problems/merge-intervals
300. 最长上升子序列2https://leetcode-cn.com/problems/longest-increasing-subsequence
剑指 Offer 38. 字符串的排列2https://leetcode-cn.com/problems/zi-fu-chuan-de-pai-lie-lcof
补充题 14. 阿拉伯数字转中文数字2
400. 第 N 个数字2https://leetcode-cn.com/problems/nth-digit
101. 对称二叉树2https://leetcode-cn.com/problems/symmetric-tree
剑指 Offer 48. 最长不含重复字符的子字符串1https://leetcode-cn.com/problems/zui-chang-bu-han-zhong-fu-zi-fu-de-zi-zi-fu-chuan-lcof
680. 验证回文字符串 Ⅱ1https://leetcode-cn.com/problems/valid-palindrome-ii
124. 二叉树中的最大路径和1https://leetcode-cn.com/problems/binary-tree-maximum-path-sum
221. 最大正方形1https://leetcode-cn.com/problems/maximal-square
98. 验证二叉搜索树1https://leetcode-cn.com/problems/validate-binary-search-tree
1047. 删除字符串中的所有相邻重复项1https://leetcode-cn.com/problems/remove-all-adjacent-duplicates-in-string
44. 通配符匹配1https://leetcode-cn.com/problems/wildcard-matching
130. 被围绕的区域1https://leetcode-cn.com/problems/surrounded-regions
16. 最接近的三数之和1https://leetcode-cn.com/problems/3sum-closest
498. 对角线遍历1https://leetcode-cn.com/problems/diagonal-traverse
224. 基本计算器1https://leetcode-cn.com/problems/basic-calculator
227. 基本计算器 II1https://leetcode-cn.com/problems/basic-calculator-ii
剑指 Offer 04. 二维数组中的查找1https://leetcode-cn.com/problems/er-wei-shu-zu-zhong-de-cha-zhao-lcof
443. 压缩字符串1https://leetcode-cn.com/problems/string-compression
✅ 142. 环形链表 II1https://leetcode-cn.com/problems/linked-list-cycle-ii
984. 不含 AAA 或 BBB 的字符串1https://leetcode-cn.com/problems/string-without-aaa-or-bbb
151. 翻转字符串里的单词1https://leetcode-cn.com/problems/reverse-words-in-a-string
213. 打家劫舍 II1https://leetcode-cn.com/problems/house-robber-ii
114. 二叉树展开为链表1https://leetcode-cn.com/problems/flatten-binary-tree-to-linked-list
109. 有序链表转换二叉搜索树1https://leetcode-cn.com/problems/convert-sorted-list-to-binary-search-tree
242. 有效的字母异位词1https://leetcode-cn.com/problems/valid-anagram
862. 和至少为 K 的最短子数组1https://leetcode-cn.com/problems/shortest-subarray-with-sum-at-least-k
1498. 满足条件的子序列数目1https://leetcode-cn.com/problems/number-of-subsequences-that-satisfy-the-given-sum-condition
257. 二叉树的所有路径1https://leetcode-cn.com/problems/binary-tree-paths
63. 不同路径 II1https://leetcode-cn.com/problems/unique-paths-ii
609. 在系统中查找重复文件1https://leetcode-cn.com/problems/find-duplicate-file-in-system
232. 用栈实现队列1https://leetcode-cn.com/problems/implement-queue-using-stacks
39. 组合总和1https://leetcode-cn.com/problems/combination-sum
剑指 Offer 10- I. 斐波那契数列1https://leetcode-cn.com/problems/fei-bo-na-qi-shu-lie-lcof
361. 轰炸敌人1https://leetcode-cn.com/problems/bomb-enemy
525. 连续数组1https://leetcode-cn.com/problems/contiguous-array
96. 不同的二叉搜索树1https://leetcode-cn.com/problems/unique-binary-search-trees
103. 二叉树的锯齿形层次遍历1https://leetcode-cn.com/problems/binary-tree-zigzag-level-order-traversal
717. 1 比特与 2 比特字符1https://leetcode-cn.com/problems/1-bit-and-2-bit-characters
1353. 最多可以参加的会议数目1https://leetcode-cn.com/problems/maximum-number-of-events-that-can-be-attended
剑指 Offer 63. 股票的最大利润1https://leetcode-cn.com/problems/gu-piao-de-zui-da-li-run-lcof
剑指 Offer 27. 二叉树的镜像1https://leetcode-cn.com/problems/er-cha-shu-de-jing-xiang-lcof
LCP 04. 覆盖1https://leetcode-cn.com/problems/broken-board-dominoes
剑指 Offer 39. 数组中出现次数超过一半的数字1https://leetcode-cn.com/problems/shu-zu-zhong-chu-xian-ci-shu-chao-guo-yi-ban-de-shu-zi-lcof
剑指 Offer 07. 重建二叉树1https://leetcode-cn.com/problems/zhong-jian-er-cha-shu-lcof
829. 连续整数求和1https://leetcode-cn.com/problems/consecutive-numbers-sum
1356. 根据数字二进制下 1 的数目排序1https://leetcode-cn.com/problems/sort-integers-by-the-number-of-1-bits
6. Z 字形变换1https://leetcode-cn.com/problems/zigzag-conversion
704. 二分查找1https://leetcode-cn.com/problems/binary-search
111. 二叉树的最小深度1https://leetcode-cn.com/problems/minimum-depth-of-binary-tree
105. 从前序与中序遍历序列构造二叉树1https://leetcode-cn.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal
783. 二叉搜索树节点最小距离1https://leetcode-cn.com/problems/minimum-distance-between-bst-nodes
剑指 Offer 42. 连续子数组的最大和1https://leetcode-cn.com/problems/lian-xu-zi-shu-zu-de-zui-da-he-lcof
55. 跳跃游戏1https://leetcode-cn.com/problems/jump-game
2. 两数相加1https://leetcode-cn.com/problems/add-two-numbers
1410. HTML 实体解析器1https://leetcode-cn.com/problems/html-entity-parser
125. 验证回文串1https://leetcode-cn.com/problems/valid-palindrome
12. 整数转罗马数字1https://leetcode-cn.com/problems/integer-to-roman
45. 跳跃游戏 II1https://leetcode-cn.com/problems/jump-game-ii
43. 字符串相乘1https://leetcode-cn.com/problems/multiply-strings

Released under the MIT License.