1. Pattern: Sliding window,滑动窗口类型
经典题目:
206.Maximum Sum Subarray of Size K (easy)
https://leetcode-cn.com/problems/reverse-linked-list/
Smallest Subarray with a given sum (easy)
Link Not found
395.Longest Substring with K Distinct Characters (medium)
https://leetcode-cn.com/problems/longest-substring-with-at-least-k-repeating-characters/
904.Fruits into Baskets (medium)
https://leetcode-cn.com/problems/fruit-into-baskets/
No-repeat Substring (hard)-Link Not found
Longest Substring with Same Letters after Replacement (hard) - Link Not found
1493.Longest Subarray of 1’s After Deleting One Element(Medium)
https://leetcode-cn.com/problems/longest-subarray-of-1s-after-deleting-one-element/
2. Pattern: two points, 双指针类型
经典题目:
Pair with Target Sum (easy) - Link Not found
26.Remove Duplicates from Sorted Array(Easy)
https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array/
977.Squaring a Sorted Array (easy)
https://leetcode-cn.com/problems/squares-of-a-sorted-array/
Triplet Sum to Zero (medium)
Triplet Sum Close to Target (medium)
Triplets with Smaller Sum (medium)
Subarrays with Product Less than a Target (medium)
Dutch National Flag Problem (medium)
3. Pattern: Fast & Slow pointers, 快慢指针类型
经典题目:
141.LinkedList Cycle (easy)
https://leetcode-cn.com/problems/insert-interval/
Start of LinkedList Cycle (medium) - Link Not found
202.Happy Number (medium)
https://leetcode-cn.com/problems/insert-interval/
876.Middle of the LinkedList (easy)
https://leetcode-cn.com/problems/insert-interval/
4. Pattern: Merge Intervals,区间合并类型
经典题目:
56.Merge Intervals (medium)
https://leetcode-cn.com/problems/merge-intervals/
57.Insert Interval (Hard)
https://leetcode-cn.com/problems/insert-interval/
986.Intervals Intersection (medium)
https://leetcode-cn.com/problems/interval-list-intersections/
Conflicting Appointments (medium) - Link Not found
5. Pattern: Cyclic Sort,循环排序
经典题目:
Cyclic Sort (easy) - Link Not found
Find the Missing Number (easy)- Link Not found
Find all Missing Numbers (easy)- Link Not found
287.Find the Duplicate Number (easy)
https://leetcode-cn.com/problems/find-the-duplicate-number/
442.Find all Duplicate Numbers (easy)
https://leetcode-cn.com/problems/find-all-duplicates-in-an-array/
6. Pattern: In-place Reversal of a LinkedList,链表翻转
经典题目:
206.Reverse a LinkedList (easy)
https://leetcode-cn.com/problems/reverse-linked-list/
92.Reverse a LinkedList II (medium)
https://leetcode-cn.com/problems/reverse-linked-list-ii/
Reverse a Sub-list (medium)- Link Not found
Reverse every K-element Sub-list (medium)- Link Not found
7. Pattern: Tree Breadth First Search,树上的BFS
经典题目:
102.Binary Tree Level Order Traversal (easy)
https://leetcode-cn.com/problems/binary-tree-level-order-traversal/
Reverse Level Order Traversal (easy) - Link Not found
103.Zigzag Traversal (medium)
https://leetcode-cn.com/problems/binary-tree-zigzag-level-order-traversal/
Level Averages in a Binary Tree (easy) - Link Not found
111.Minimum Depth of a Binary Tree (easy)
https://leetcode-cn.com/problems/minimum-depth-of-binary-tree/
Level Order Successor (easy) - Link Not found
Connect Level Order Siblings (medium) - Link Not found
8. Pattern: Tree Depth First Search,树上的DFS
经典题目:
257.Binary Tree Paths (easy)
https://leetcode-cn.com/problems/binary-tree-paths/
124.All Paths for a Sum (hard)
https://leetcode-cn.com/problems/binary-tree-maximum-path-sum/
112.Sum of Path Numbers (medium)
https://leetcode-cn.com/problems/path-sum/
113.Sum of Path Numbers ii (medium)
https://leetcode-cn.com/problems/path-sum-ii/
Path With Given Sequence (medium) - Link Not found - Link Not found
Count Paths for a Sum (medium) - Link Not found
9. Pattern: Two Heaps,双堆类型
经典题目:
295.Find the Median of a Number Stream (medium)
https://leetcode-cn.com/problems/find-median-from-data-stream/
480.Sliding Window Median (hard)
https://leetcode-cn.com/problems/sliding-window-median/
Maximize Capital (hard) - Link Not found
10. Pattern: Subsets,子集类型,一般都是使用多重DFS
经典题目:
78.Subsets (medium)
https://leetcode-cn.com/problems/subsets/
90.Subsets II (medium)
https://leetcode-cn.com/problems/subsets-ii/
Subsets With Duplicates (easy) - Link Not found
46.Permutations (medium)
https://leetcode-cn.com/problems/permutations/
47.Permutations II (medium)
https://leetcode-cn.com/problems/permutations-ii/
String Permutations by changing case (medium) - Link Not found
Balanced Parentheses (hard) - Link Not found
Unique Generalized Abbreviations (hard) - Link Not found
11. Pattern: Modified Binary Search,改造过的二分
经典题目:
Order-agnostic Binary Search (easy) - Link Not found
Ceiling of a Number (medium) - Link Not found
Next Letter (medium) - Link Not found
Number Range (medium) - Link Not found
Search in a Sorted Infinite Array (medium) - Link Not found
Minimum Difference Element (medium) - Link Not found
Bitonic Array Maximum (easy) - Link Not found
12. Pattern: Top ‘K’ Elements,前K个系列
经典题目:
Top ‘K’ Numbers (easy)
215 Kth Largest Element in an Array (medium)
https://leetcode-cn.com/problems/kth-largest-element-in-an-array/
973.‘K’ Closest Points to the Origin (easy)
https://leetcode-cn.com/problems/k-closest-points-to-origin/
Connect Ropes (easy) - Link Not found
347.Top ‘K’ Frequent Numbers (medium)
https://leetcode-cn.com/problems/top-k-frequent-elements/
451.Frequency Sort (medium)
https://leetcode-cn.com/problems/sort-characters-by-frequency/
703.Kth Largest Number in a Stream (medium)
https://leetcode-cn.com/problems/kth-largest-element-in-a-stream/
658.‘K’ Closest Numbers (medium)
https://leetcode-cn.com/problems/find-k-closest-elements/
Maximum Distinct Elements (medium) - Link Not found
Sum of Elements (medium) - Link Not found
358.Rearrange String (hard) - locked
13. Pattern: K-way merge,多路归并
经典题目:
23.Merge K Sorted Lists (hard)
https://leetcode-cn.com/problems/merge-k-sorted-lists/
Kth Smallest Number in M Sorted Lists (Medium)- Link Not found
378.Kth Smallest Number in a Sorted Matrix (Hard)
https://leetcode-cn.com/problems/kth-smallest-element-in-a-sorted-matrix/
Smallest Number Range (Hard) - Link Not found
14. Pattern: 0/1 Knapsack (Dynamic Programming),0/1背包类型
经典题目:
0/1 Knapsack (medium)- Link Not found
416.Equal Subset Sum Partition (medium)
https://leetcode-cn.com/problems/partition-equal-subset-sum/
Subset Sum (medium)- Link Not found
Minimum Subset Sum Difference (hard)- Link Not found
368.最大整除子集(medium)
https://leetcode-cn.com/problems/largest-divisible-subset/
698. 划分为k个相等的子集(medium)
https://leetcode-cn.com/problems/partition-to-k-equal-sum-subsets/
15. Pattern: Topological Sort (Graph),拓扑排序类型
经典题目:
Topological Sort (medium)- Link Not found
621.Tasks Scheduling (medium)
https://leetcode-cn.com/problems/task-scheduler/
Tasks Scheduling Order (medium)- Link Not found
All Tasks Scheduling Orders (hard)- Link Not found
269.Alien Dictionary (hard)
https://leetcode-cn.com/problems/alien-dictionary/
参考资料:
https://zhuanlan.zhihu.com/p/161204634