Advanced
id | Name | difficulty | similar problems |
---|---|---|---|
208 | Implement Trie (Prefix Tree) | ★★★ | 648、676、 677、720、745、211 |
307 | Range Sum Query - Mutable | ★★★ | |
901 | Online Stock Span | ★★★ | 907、1019 |
239 | Sliding Window Maximum | ★★★ |
Search
id | Name | difficulty | similar problems |
---|---|---|---|
17 | Letter Combinations of a Phone Number | ★★ | 39 、40、77、78、90、216 |
46 | Permutations | ★★ | 47、784、943、996 |
22 | Generate Parentheses | ★★★ | 301 |
37 | Sudoku Solver | ★★★ | 51、52 |
79 | Word Search | ★★★ | 212 |
127 | Word Ladder | ★★★★ | 126、752、818 |
542 | 01 Matrix | ★★★ | 675、934 |
698 | Partition to K Equal Sum Subsets | ★★★ | 93、131、241、282、842 |
DP
id | Name | difficulty | similar problems |
---|---|---|---|
70 | Climbing Stairs | ★ | 746、1137 |
303 | Range Sum Query - Immutable | ★ | 1218 |
53 | Maximum Subarray | ★★ | 121 |
62 | Unique Paths | ★★ | 63、64、120、174、931、1210 |
85 | Maximal Rectangle | ★★★ | 221、304、1277 |
198 | House Robber | ★★★ | 213、309、740、790、801 |
279 | Perfect Squares | ★★★ | |
139 | Word Break | ★★★ | 140、818 |
300 | Longest Increasing Subsequence | ★★★ | 673、1048 |
96 | Unique Binary Search Trees | ★★★ | |
1105 | Filling Bookcase Shelves | ★★★ | |
131 | Palindrome Partitioning | ★★★ | 89 |
72 | Edit Distance | ★★★ | 10、44、97、115、583、712、1187、1143、1092、718 |
1139 | Largest 1-Bordered Square | ★★★ | |
688 | Knight Probability in Chessboard | ★★★ | 576、935 |
322 | Coin Change | ★★★ | 377、416、494、1043、1049、1220、1230、1262、1269 |
813 | Largest Sum of Averages | ★★★★ | 1278、1335、410 |
1223 | Dice Roll Simulation | ★★★★ | |
312 | Burst Balloons | ★★★★ | 664、1024、1039、1140、1130 |
741 | Cherry Pickup | ★★★★ | |
546 | Remove Boxes | ★★★★★ | |
943 | Find the Shortest Superstring | ★★★★★ | 980、996、1125 |
Graph
id | Name | difficulty | similar problems |
---|---|---|---|
133 | Clone Graph | ★★ | 138 |
200 | Number of Islands | ★★ | 547、695、733、827、1162 |
841 | Keys and Rooms | ★★ | 1202 |
207 | Course Schedule | ★★★ | 210、802 |
399 | Evaluate Division | ★★★ | 839、952、990、721 737 |
785 | Is Graph Bipartite? | ★★★ | 886、1042 |
997 | Find the Town Judge | ★★★ | |
433 | Minimum Genetic Mutation | ★★★ | 815、863、1129、1263 |
684 | Redundant Connection | ★★★★ | 685、1319 |
743 | Network Delay Time | ★★★★ | 787、882、924、1334 |
847 | Shortest Path Visiting All Nodes | ★★★★ | 864、1298 |
332 | Reconstruct Itinerary | ★★★★ | |
1192 | Critical Connections in a Network | ★★★★ | |
943 | Find the Shortest Superstring | ★★★★★ | 980、996 |
959 | Regions Cut By Slashes | ★★★★★ |
Tree
id | Name | difficulty | similar problems |
---|---|---|---|
94 | Binary Tree Inorder Traversal | ★ | 144、145、429、589、590、987、1302 |
100 | Same Tree | ★★ | 101、104、110、111、572、965 |
102 | Binary Tree Level Order Traversal | ★★ | 107、429、872 |
814 | Binary Tree Pruning | ★★★ | 669、1325 |
112 | Path Sum | ★★★ | 113、437 |
129 | Sum Root to Leaf Numbers | ★★★ | 257 |
236 | Lowest Common Ancestor of a Binary Tree | ★★★ | 235 |
297 | Serialize and Deserialize Binary Tree | ★★★ | 449 |
508 | Most Frequent Subtree Sum | ★★★ | |
124 | Binary Tree Maximum Path Sum | ★★★ | 543、687 |
968 | Binary Tree Cameras | ★★★★ | 337、979 |
Binary Search
id | Name | difficulty | similar problems |
---|---|---|---|
35 | Search Insert Position | ★★ | 34、704、981 |
33 | Search in Rotated Sorted Array | ★★★ | 81、153、154、162、852 |
69 | Sqrt(x) | ★★★ | |
74 | Search a 2D Matrix | ★★★ | |
875 | Koko Eating Bananas | ★★★ | 1011 |
4 | Median of Two Sorted Arrays | ★★★★ | |
378 | Kth Smallest Element in a Sorted Matrix | ★★★★ | 668 |
719 | Find K-th Smallest Pair Distance | ★★★★ | 786 |
BST
id | Name | difficulty | similar problems |
---|---|---|---|
98 | Validate Binary Search Tree | ★★ | 530 |
700 | Search in a Binary Search Tree | ★★ | 701 |
230 | Kth Smallest Element in a BST | ★★★ | |
99 | Recover Binary Search Tree | ★★★ | |
108 | Convert Sorted Array to Binary Search Tree | ★★★ | |
501 | Find Mode in Binary Search Tree | ★★★ | |
450 | Delete Node in a BST | ★★★★ |
HashTable
id | Name | difficulty | similar problems |
---|---|---|---|
1 | Two Sum | ★★ | 560 |
Greedy
id | Name | difficulty | similar problems |
---|---|---|---|
218 | Skyline Problem | ★★★ |
List
id | Name | difficulty | similar problems |
---|---|---|---|
2 | Add Two Numbers | ★★ | 445 |
24 | Swap Nodes in Pairs | ★★ | |
206 | Reverse Linked List | ★★ | |
141 | Linked List Cycle | ★★ | 142 |
23 | Merge k Sorted Lists | ★★★ | 21 |
147 | Insertion Sort List | ★★★ | |
148 | Sort List | ★★★★ | |
707 | Design Linked List | ★★★★ |
Two Pointers
id | Name | difficulty | similar problems |
---|---|---|---|
11 | Container With Most Water | ★★ | |
167 | Two Sum II - Input array is sorted | ★★ | |
977 | Squares of a Sorted Array | ★★ |
Recursion
id | Name | difficulty | similar problems |
---|---|---|---|
726 | Number of Atoms | ★★★ | 736、394 |
856 | Score of Parentheses | ★★★ |
Divide and Conquer
id | Name | difficulty | similar problems |
---|---|---|---|
169 | Majority Element | ★★ | |
315 | Count of Smaller Numbers After Self | ★★★★ |
Others
id | Name | difficulty | similar problems |
---|---|---|---|
470 | Implement Rand10() Using Rand7() | ||
299 | Bulls and Cows |