TOP 100 https://leetcode.com/problem-list/top-100-liked-questions/
- 分类刷,题解详细,多语言 https://github.com/youngyangyang04/leetcode-master#toc2
- 中文leetcode https://leetcode.cn/problemset/all/
- labuladong https://labuladong.gitee.io/algo/
其他
- https://siddontang.gitbooks.io/leetcode-solution/content/index.html
- python版: http://bookshadow.com/leetcode/
Leetcode problems classified by company:
FT - Fast Try
已完成题目
| 题号 | 名称 | 难度 | 标签 | 备注 |
|---|---|---|---|---|
| 1 | Two Sum | Easy | Hash Table | |
| 2 | Add Two Numbers | Medium | Linked List | |
| 3 | Longest Substring Without Repeating Characters | Medium | Sliding Window,Hash Table | |
| 5 | Longest Palindromic Substring | Medium | Dynamic Programming/Two Pointers | TODO 一题多解 |
| 6 | Zigzag Conversion | Medium | 一题多解TODO | |
| 10 | Regular Expression Matching | Hard | ||
| 11 | Container With Most Water | Medium | Two Pointers | |
| 15 | 3Sum | Medium | Two Pointers | |
| 17 | Letter Combinations of a Phone Number | Medium | Backtracking | |
| 19 | Remove Nth Node From End of List | Medium | Two Pointers | |
| 20 | Valid Parentheses | Easy | Stack | |
| 21 | Merge Two Sorted Lists | Easy | ||
| 22 | Generate Parentheses | Medium | Dynamic Programming,Backtracking | 复习1次 |
| 23 | Merge k Sorted Lists | Hard | ||
| 24 | Swap Nodes in Pairs | Medium | Linked List/Recursion | 一题多解决 |
| 26 | Remove Duplicates from Sorted Array | Easy | ||
| 27 | Remove Element | Easy | Two Pointers | 一题多解 |
| 31 | Next Permutation | Medium | ||
| 33 | Search in Rotated Sorted Array | Medium | Binary Search | 一题多解 |
| 34 | Find First and Last Position of Element in Sorted Array | Medium | Binary Search | |
| 35 | Search Insert Position | Easy | Binary Search | |
| 39 | Combination Sum | Medium | Backtracking | |
| 41 | First Missing Positive | Hard | Hash Table | 一题多解 |
| 42 | Trapping Rain Water | Hard | Dynamic Programming/Stack/Two Pointers | FT, TODO 一题多解,重点复习 |
| 45 | Jump Game II | Medium | Dynamic Programming/Greedy | 一题多解 |
| 46 | Permutations | Medium | Backtracking | |
| 48 | Rotate Image | Medium | TODO 一题多解 | |
| 49 | Group Anagrams | Medium | FT,TODO 一题多解 | |
| 53 | Maximum Subarray | Medium | Dynamic Programming/divide and conquer | 一题多解 |
| 54 | Spiral Matrix | Medium | FT | |
| 55 | Jump Game | Medium | Greedy | |
| 56 | Merge Intervals | Medium | Sort | FT |
| 62 | Unique Paths | Medium | ||
| 63 | Unique Paths II | Medium | 待重做 | |
| 64 | Minimum Path Sum | Medium | Dynamic Programming | FT |
| 70 | Climbing Stairs | Easy | Dynamic Programming/Recursion | 一题多解 |
| 72 | Edit Distance | Hard | Dynamic Programming | |
| 73 | Set Matrix Zeroes | Medium | Array | FT,TODO待优化 |
| 74 | Search a 2D Matrix | Medium | Binary Search | FT, TODO 两次二分 |
| 75 | Sort Colors | Medium | Two Pointers/ | 一题多解, TODO |
| 77 | Combinations | Medium | Backtracking | |
| 78 | Subsets | Medium | Backtracking | FT |
| 79 | Word Search | Medium | Backtracking | 待查题解 |
| 94 | Binary Tree Inorder Traversal | Easy | Binary Tree/Stack | 一题多解,待复习 |
| 96 | Unique Binary Search Trees | Medium | Dynamic Programming | |
| 98 | Validate Binary Search Tree | Medium | Binary Search/Recursion | 一题多解 |
| 101 | Symmetric Tree | Easy | Binary Tree/Queue/Stack | 一题多解 |
| 102 | Binary Tree Level Order Traversal | Medium | Binary Tree,DFS/BFS | 一题多解 |
| 104 | Maximum Depth of Binary Tree | Easy | Binary Tree/Queue | |
| 105 | Construct Binary Tree from Preorder and Inorder Traversal | Medium | Binary Tree,divide and conquer | 只写了常规解法 |
| 106 | Construct Binary Tree from Inorder and Postorder Traversal | Medium | Binary Tree,divide and conquer | |
| 107 | Binary Tree Level Order Traversal II | Medium | Binary Tree,DFS/BFS | 同第102题,TODO |
| 110 | Balanced Binary Tree | Easy | Binary Tree/Queue | |
| 111 | Minimum Depth of Binary Tree | Easy | Binary Tree/Queue | |
| 112 | Path Sum | Easy | Binary Tree/Queue | |
| 113 | Path Sum II | Easy | Binary Tree | TODO |
| 114 | Flatten Binary Tree to Linked List | Medium | Binary Tree | FT, TODO 待优化 |
| 115 | Distinct Subsequences | Hard | Dynamic Programming | TODO待复习 |
| 120 | Triangle | Medium | ||
| 121 | Best Time to Buy and Sell Stock | Easy | 待查最优解,以及一题多解 | |
| 122 | Best Time to Buy and Sell Stock II | Medium | Dynamic Programming/Greedy | 一题多解 |
| 128 | Longest Consecutive Sequence | Medium | Hash Table | TODO一题多解 |
| 131 | Palindrome Partitioning | Medium | Backtracking, Dynamic Programming | FT, TODO 待复习, 关联题目LeetCode 5 |
| 138 | Copy List with Random Pointer | Medium | Hash Table | FT,一题多解 |
| 139 | Word Break | Medium | Dynamic Programming,完全背包 | |
| 141 | Linked List Cycle | Easy | Two Pointers | |
| 142 | Linked List Cycle II | Medium | Two Pointers/Hash Table | FT |
| 144 | Binary Tree Preorder Traversal | Easy | Binary Tree/Stack | 一题多解 |
| 148 | Sort List | Medium | ||
| 150 | Evaluate Reverse Polish Notation | Medium | Stack | |
| 152 | Maximum Product Subarray | Medium | Dynamic Programming | FT |
| 153 | Find Minimum in Rotated Sorted Array | Medium | ||
| 155 | Min Stack | Medium | Stack | FT |
| 162 | Find Peak Element | Medium | ||
| 169 | Majority Element | Easy | ||
| 198 | House Robber | Medium | Dynamic Programming | |
| 199 | Binary Tree Right Side View | Medium | Binary Tree | |
| 202 | Happy Number | Easy | ||
| 206 | Reverse Linked List | Easy | Linked List/Recursion | 一题多解 |
| 209 | Minimum Size Subarray Sum | Medium | Sliding Window/Binary Search | 一题多解 |
| 216 | Combination Sum III | Medium | Backtracking | 一题多解 |
| 221 | Maximal Square | Medium | ||
| 222 | Count Complete Tree Nodes | Medium | Binary Tree/Binary Search | TODO一题多解 |
| 226 | Invert Binary Tree | Easy | Binary Tree | |
| 230 | Kth Smallest Element in a BST | Medium | Binary Tree | 只写了常规解法 |
| 231 | Power of Two | Easy | ||
| 236 | Lowest Common Ancestor of a Binary Tree | Medium | Binary Tree | |
| 239 | Sliding Window Maximum | Hard | Sliding Window,Monotonic Queue | |
| 257 | Binary Tree Paths | Easy | ||
| 268 | Missing Number | Easy | Hash Table/Bit Manipulation | 一题多解 |
| 300 | Longest Increasing Subsequence | Medium | Dynamic Programming,Binary Search | 经典题 |
| 322 | Coin Change | Medium | Dynamic Programming,完全背包 | |
| 343 | Integer Break | Medium | Dynamic Programming | 一题多解 |
| 344 | Reverse String | Easy | ||
| 347 | Top K Frequent Elements | Medium | Heap/Bucket Sort | 一题多解 |
| 349 | Intersection of Two Arrays | Easy | ||
| 354 | Russian Doll Envelopes | Hard | ||
| 376 | Wiggle Subsequence | Medium | Greedy/Dynamic Programming | TODO 一题多解 |
| 392 | Is Subsequence | Easy | Dynamic Programming/Two Pointers | 一题多解 |
| 404 | Sum of Left Leaves | Easy | Binary Tree | |
| 416 | Partition Equal Subset Sum | Medium | Dynamic Programming,01背包 | |
| 455 | Assign Cookies | Easy | Greedy | |
| 474 | Ones and Zeroes | Medium | Dynamic Programming,01背包 | TODO 二维解法 |
| 494 | Target Sum | Medium | Dynamic Programming | TODO 一般解 |
| 501 | Find Mode in Binary Search Tree | Easy | Binary Tree | |
| 513 | Find Bottom Left Tree Value | Medium | Binary Tree | |
| 516 | Longest Palindromic Subsequence | Dynamic Programming | ||
| 518 | Coin Change 2 | Medium | Dynamic Programming,完全背包 | |
| 530 | Minimum Absolute Difference in BST | Easy | Binary Tree | |
| 541 | Reverse String II | Easy | Two Pointers | TODO |
| 583 | Delete Operation for Two Strings | Medium | Dynamic Programming | TODO 一题多解 |
| 617 | Merge Two Binary Trees | Easy | Binary Tree | |
| 637 | Average of Levels in Binary Tree | Easy | Binary Tree | |
| 647 | Palindromic Substrings | Medium | Dynamic Programming/Two Pointers | 一题多解 |
| 654 | Maximum Binary Tree | Medium | Binary Tree | |
| 674 | Longest Continuous Increasing Subsequence | Easy | Dynamic Programming | 一题多解,对比第300题 |
| 700 | Search in a Binary Search Tree | Easy | Binary Search | |
| 704 | Binary Search | Easy | ||
| 718 | Maximum Length of Repeated Subarray | Medium | Dynamic Programming | TODO 滚动数组写法 |
| 977 | Squares of a Sorted Array | Easy | Two Pointers | TODO |
| 1035 | Uncrossed Lines | Medium | Dynamic Programming | 同第1143题 |
| 1143 | Longest Common Subsequence | Medium | Dynamic Programming | 待优化 |
| 题号 | 名称 | 难度 | 标签 | 备注 |
|---|---|---|---|---|
| 206 | Reverse Linked List | Easy |
206,141,21,19,876 单链表反转 链表中环的检测 两个有序的链表合并 删除链表倒数第 n 个结点 求链表的中间结点
栈相关 20,155,232,844,224,682,496.
94、105、106、889 中序遍历
基础题
- 509 斐波那契额数列
- 70 爬楼梯
- 746 最小花费爬楼梯
- 62 不同路径
- 63 不同路径II
- 343 整数拆分
- 96 不同的二叉搜索树