- LeetCode 顺序刷题参考
- 答案集题型分类汇总
各类题目难度等级由低到高,按照顺序练习即可。。。
- K-SUM类题目
题目序号 | leetcode链接 | 难度 | 复杂度 | 答案传送 |
---|---|---|---|---|
1 | Two Sum | easy | ||
167 | Two Sum II - Input array is sorted | Easy | ||
15 | 3Sum | Medium | ||
16 | 3Sum Closest | Medium | ||
259 | 3Sum Smaller | Medium | ||
18 | 4Sum | Medium |
题目序号 | leetcode链接 | 难度 | 复杂度 | 答案传送 |
---|---|---|---|---|
56 | Merge Intervals | Medium | ||
57 | Insert Interval | Hard | ||
252 | Meeting Rooms | easy | ||
253 | Meeting Rooms II | medium | ||
352 | Data Stream as Disjoint Intervals | hard |
题目序号 | leetcode链接 | 难度 | 复杂度 | 答案传送 |
---|---|---|---|---|
78 | Subsets | medium | ||
90 | Subsets II | medium | ||
53 | Maximum Subarray | easy | ||
152 | Maximum Product Subarray | medium | ||
239 | Sliding Window Maximum | hard | ||
295 | Find Median from Data Stream | hard | ||
228 | Summary Ranges | medium | ||
163 | Missing Ranges | medium | ||
325 | Maximum Size Subarray Sum Equals k | medium | ||
209 | Minimum Size Subarray Sum | medium | ||
238 | Product of Array Except Self | medium | ||
128 | Longest Consecutive Sequence | Hard |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
48 | Rotate Image | Medium | |
89 | Search in Rotated Sorted Array | Medium | |
189 | Rotate Array | Easy | |
81 | Search in Rotated Sorted Array II | Medium |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
88 | Merge Sorted Array | Easy | |
75 | Sort Colors | Medium | |
283 | Move Zeroes | Easy | |
376 | Wiggle Subsequence | medium | |
280 | Wiggle Sort | medium | |
324 | Wiggle Sort II | medium | |
215 | Kth Largest Element in an Array | medium | |
287 | Find the Duplicate Number | medium | |
334 | Increasing Triplet Subsequence | medium | |
400 | Nth Digit | easy | |
387 | First Unique Character in a String | easy | |
164 | Maximum Gap | hard | |
347 | Top K Frequent Elements | medium | |
243 | Shortest Word Distance | easy | |
244 | Shortest Word Distance II | medium | |
245 | Shortest Word Distance III | medium |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
11 | Container With Most Water | Medium | |
41 | First Missing Positive | Hard | |
42 | Trapping Rain Water | Hard | |
84 | Largest Rectangle in Histogram | Hard | |
85 | Maximal Rectangle | Hard | |
243 | Shortest Word Distance | Easy | |
244 | Shortest Word Distance II | medium | |
245 | Shortest Word Distance III | Medium |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
48 | Rotate Image | Medium | |
54 | Spiral Matrix | Medium | |
73 | Set Matrix Zeroes | Medium | |
311 | Sparse Matrix Multiplication | medium | |
36 | Valid Sudoku | meidum | |
37 | Sudoku Solver | hard |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
62 | Unique Paths | Medium | |
63 | Unique Paths II | Medium | |
64 | Minimum Path Sum | Medium | |
120 | Triangle | Medium |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
105 | Construct Binary Tree from Preorder and Inorder Traversal | Medium | |
106 | Construct Binary Tree from Inorder and Postorder Traversal | Medium |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
66 | Plus One | Easy | |
118 | Pascal's Triangle | Easy | |
119 | Pascal's Triangle II | Easy |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
217 | Contains Duplicate | Easy | |
219 | Contains Duplicate II | Easy | |
380 | Insert Delete GetRandom O(1) | Medium | |
381 | Insert Delete GetRandom O(1) - Duplicates allowed | Hard | |
31 | Next Permutation | Medium |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
33 | Search in Rotated Sorted Array | Medium | |
81 | Search in Rotated Sorted Array II | Medium | |
34 | Find First and Last Position of Element in Sorted Array | Medium | |
35 | Search Insert Position | Easy | |
74 | Search a 2D Matrix | Medium | |
79 | Word Search | Medium | |
153 | Find Minimum in Rotated Sorted Array | Medium | |
154 | Find Minimum in Rotated Sorted Array II | Hard | |
39 | Combination Sum | Medium | |
40 | Combination Sum II | Medium | |
216 | Combination Sum III | Medium | |
45 | Jump Game II | Hard | |
55 | Jump Game | Medium | |
121 | Best Time to Buy and Sell Stock | Easy | |
122 | Best Time to Buy and Sell Stock II | Easy | |
123 | Best Time to Buy and Sell Stock III | Hard | |
126 | Word Ladder II | Hard | |
162 | Find Peak Element | Medium | |
169 | Majority Element | Easy | |
229 | Majority Element II | Medium |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
26 | Remove Duplicates from Sorted Array | Easy | |
27 | Remove Element | Easy | |
80 | Remove Duplicates from Sorted Array II | Medium |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
4 | Median of Two Sorted Arrays | Hard | |
289 | Game of Life | Medium |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
274 | H-Index | medium | |
376 | Wiggle Subsequence | medium | |
277 | Find the Celebrity | medium | |
370 | Range Addition | medium | |
296 | Best Meeting Point | hard |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
19 | Remove Nth Node From End of List | medium | |
82 | Remove Duplicates from Sorted List II | Medium | |
83 | Remove Duplicates from Sorted List | Easy | |
203 | Remove Linked List Elements | Easy | |
237 | Delete Node in a Linked List | Easy |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
25 | Reverse Nodes in k-Group | Hard | |
61 | Rotate List | Medium | |
92 | Reverse Linked List II | Medium | |
206 | Reverse Linked List | Easy |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
2 | Add Two Numbers | medium | |
21 | Merge Two Sorted Lists | Easy | |
23 | Merge k Sorted Lists | Hard | |
445 | Add Two Numbers II | Medium |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
141 | Linked List Cycle | Easy | |
142 | Linked List Cycle II | Medium | |
708 | Insert into a Cyclic Sorted List | Medium |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
725 | Split Linked List in Parts | Medium | |
86 | Partition List | Medium |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
143 | Reorder List | Medium | |
147 | Insertion Sort List | Medium | |
148 | Sort List | Medium |
序号 | 题目 | 难度 | 代码 |
---|---|---|---|
109 | Convert Sorted List to Binary Search Tree | Medium | |
138 | Copy List with Random Pointer | Medium | |
160 | Intersection of Two Linked Lists | Easy | |
234 | Palindrome Linked List | Easy | |
328 | Odd Even Linked List | Medium | |
369 | Plus One Linked List | Medium | |
379 | Design Phone Directory | Medium | |
426 | Convert Binary Search Tree to Sorted Doubly Linked List | Medium | |
430 | Flatten a Multilevel Doubly Linked List | Medium | |
707 | Design Linked List | Easy | |
817 | Linked List Components | Medium | |
876 | Middle of the Linked List | Easy |