LeetCode刷题资料

刷题顺序

LeetCode400道

1 Two Sum 49.3% 简单 HashMap
2 Add Two Numbers 38.1% 适中 数组相关
3 Longest Substring Without Repeating Characters 35.4% 适中 HashMap
4 Median of Two Sorted Arrays 38.6% 困难 难且重要
5 Longest Palindromic Substring 31.6% 适中 Palindrome
6 ZigZag Conversion 48.6% 适中 不重要
7 Reverse Integer 34.6% 简单 基础
8 String to Integer (atoi) 20.9% 适中 基础
9 Palindrome Number 58.5% 简单 Palindrome
10 Regular Expression Matching 30.2% 困难 超难
11 Container With Most Water 64% 适中 双向双指针
12 Integer to Roman 64.2% 适中 实现题
13 Roman to Integer 62% 简单 实现题
14 Longest Common Prefix 38.6% 简单 Java基础
15 3Sum 29.1% 适中 求和
16 3Sum Closest 45.8% 适中 双向双指针
17 Letter Combinations of a Phone Number 54.3% 适中 实现题
18 4Sum 38.3% 适中 求和
19 Remove Nth Node From End of List 39.3% 适中 删除
20 Valid Parentheses 42.8% 简单 平衡符号
21 Merge Two Sorted Lists 64% 简单 数组相关
22 Generate Parentheses 76% 适中 Parentheses
23 Merge k Sorted Lists 52.8% 困难 数组相关&PriorityQueue
24 Swap Nodes in Pairs 66.5% 适中 基础操作
25 Reverse Nodes in k-Group 62.6% 困难 反转
26 Remove Duplicates from Sorted Array 51.4% 简单 单向双指针
27 Remove Element 58.6% 简单 单向双指针
28 Implement strStr() 39.7% 简单 Java基础
29 Divide Two Integers 20.1% 适中 加减乘除
30 Substring with Concatenation of All Words 31.6% 困难 Substring&Sliding Window
31 Next Permutation 34.4% 适中 排列&规律
32 Longest Valid Parentheses 33.6% 困难 Parentheses
33 Search in Rotated Sorted Array 38.5% 适中 旋转
34 Find First and Last Position of Element in Sorted Array 40.2% 适中 基础
35 Search Insert Position 46.6% 简单 基础
36 Valid Sudoku 60.5% 适中 特殊
37 Sudoku Solver 62.4% 困难 特殊
38 Count and Say 56.2% 适中 实现题
39 Combination Sum 69.5% 适中 组合
40 Combination Sum II 62.5% 适中 组合
41 First Missing Positive 40.2% 困难 交换
42 Trapping Rain Water 52.3% 困难 双向双指针
43 Multiply Strings 44.5% 适中 加减乘除
44 Wildcard Matching 31.2% 困难 超难
45 Jump Game II 37.4% 适中 基础
46 Permutations 76.7% 适中 排列
47 Permutations II 59.6% 适中 排列
48 Rotate Image 69.2% 适中 二维数组
49 Group Anagrams 63.1% 适中 Group&Anagram
50 Pow(x, n) 36.4% 适中 开方
51 N-Queens 70.7% 困难 极难
52 N-Queens II 79.2% 困难 极难
53 Maximum Subarray 52.1% 简单 一维
54 Spiral Matrix 41% 适中 二维数组
55 Jump Game 40.9% 适中 基础
56 Merge Intervals 42.9% 适中 区间问题
57 Insert Interval 37.5% 适中 区间问题
58 Length of Last Word 33.6% 简单 Java基础
59 Spiral Matrix II 78% 适中 二维数组
60 Permutation Sequence 49.1% 困难 排列&规律
61 Rotate List 40.6% 适中 基础操作
62 Unique Paths 61.8% 适中 网格问题
63 Unique Paths II 36.6% 适中 网格问题
64 Minimum Path Sum 67.5% 适中 网格问题
65 Valid Number 20.6% 困难
66 Plus One 45.1% 简单 加减乘除
67 Add Binary 54.4% 简单 加减乘除
68 Text Justification 44.3% 困难 极难
69 Sqrt(x) 38.8% 简单 开方
70 Climbing Stairs 50.3% 简单 网格问题
71 Simplify Path 40.4% 适中 压栈匹配
72 Edit Distance 59.7% 困难 匹配问题
73 Set Matrix Zeroes 55.8% 适中 二维数组
74 Search a 2D Matrix 38.7% 适中 二维数组
75 Sort Colors 55.3% 适中 荷兰国旗
76 Minimum Window Substring 38.8% 困难 Substring&Sliding Window
77 Combinations 74.5% 适中 组合
78 Subsets 77.8% 适中 子集&位运算
79 Word Search 42.3% 适中 Flood Fill
80 Remove Duplicates from Sorted Array II 56.2% 适中 单向双指针
81 Search in Rotated Sorted Array II 35.8% 适中 旋转
82 Remove Duplicates from Sorted List II 48.9% 适中 删除
83 Remove Duplicates from Sorted List 51.3% 简单 删除
84 Largest Rectangle in Histogram 41.4% 困难 迭代极值
85 Maximal Rectangle 47.6% 困难 迭代极值
86 Partition List 59.3% 适中 基础操作
87 Scramble String 47.2% 困难 计数排序
88 Merge Sorted Array 48.4% 简单 合并排序
89 Gray Code 68.7% 适中 不重要
90 Subsets II 60.7% 适中 子集
91 Decode Ways 24.3% 适中 匹配问题
92 Reverse Linked List II 51.1% 适中 反转
93 Restore IP Addresses 49.2% 适中 不重要
94 Binary Tree Inorder Traversal 72.5% 简单 基础
95 Unique Binary Search Trees II 66.6% 适中 不重要
96 Unique Binary Search Trees 69.1% 适中 结合
97 Interleaving String 45.2% 适中 匹配问题
98 Validate Binary Search Tree 32.2% 适中 双Pre
99 Recover Binary Search Tree 62.1% 困难 BST&Inorder
100 Same Tree 60.1% 简单 双Pre
101 Symmetric Tree 52.8% 简单 双Pre
102 Binary Tree Level Order Traversal 63.2% 适中 基础
103 Binary Tree Zigzag Level Order Traversal 54.8% 适中 BFS
104 Maximum Depth of Binary Tree 74.8% 简单 Postorder
105 Construct Binary Tree from Preorder and Inorder Traversal 67.8% 适中 不重要
106 Construct Binary Tree from Inorder and Postorder Traversal 69.3% 适中 不重要
107 Binary Tree Level Order Traversal II 66.3% 适中 BFS
108 Convert Sorted Array to Binary Search Tree 73.9% 简单 BST
109 Convert Sorted List to Binary Search Tree 76.1% 适中 BST
110 Balanced Binary Tree 54.5% 简单 Postorder
111 Minimum Depth of Binary Tree 43.2% 简单 双Pre
112 Path Sum 51% 简单 双Pre
113 Path Sum II 60.8% 适中 Preorder
114 Flatten Binary Tree to Linked List 70.9% 适中 不重要
115 Distinct Subsequences 48.7% 困难 匹配问题
116 Populating Next Right Pointers in Each Node 62.2% 适中 难且重要
117 Populating Next Right Pointers in Each Node II 51.2% 适中 难且重要
118 Pascal’s Triangle 67.1% 简单 实现题
119 Pascal’s Triangle II 61.7% 简单 实现题
120 Triangle 66.7% 适中 一维
121 Best Time to Buy and Sell Stock 54.8% 简单 实现题
122 Best Time to Buy and Sell Stock II 62.5% 简单 实现题
123 Best Time to Buy and Sell Stock III 44.6% 困难 实现题
124 Binary Tree Maximum Path Sum 43% 困难 Postorder
125 Valid Palindrome 46.2% 简单 Palindrome
126 Word Ladder II 38.5% 困难 拓扑排序
127 Word Ladder 43.2% 困难 BFS
128 Longest Consecutive Sequence 51.8% 适中 实现题
129 Sum Root to Leaf Numbers 64.6% 适中 双Pre
130 Surrounded Regions 42.2% 适中 FloodFill
131 Palindrome Partitioning 68.7% 适中 Palindrome&Backtracking
132 Palindrome Partitioning II 43.4% 困难 Palindrome&DP
133 Clone Graph 64.6% 适中 基础
134 Gas Station 53.9% 适中 数学定理
135 Candy 44.4% 困难 基础
136 Single Number 69.6% 简单 异或
137 Single Number II 67.8% 适中 不重要
138 Copy List with Random Pointer 55.9% 适中 基础
139 Word Break 47.4% 适中 字符串问题
140 Word Break II 38.5% 困难 实现题
141 Linked List Cycle 49.1% 简单
142 Linked List Cycle II 51.5% 适中
143 Reorder List 56.4% 适中 综合练习
144 Binary Tree Preorder Traversal 66.5% 简单 基础
145 Binary Tree Postorder Traversal 72.2% 简单 基础
146 LRU Cache 50.5% 适中 是否
147 Insertion Sort List 65% 适中 数组相关
148 Sort List 66.7% 适中 数组相关
149 Max Points on a Line 23% 困难 点线
150 Evaluate Reverse Polish Notation 50.4% 适中 表达式计算
151 Reverse Words in a String 43.1% 适中 基础
152 Maximum Product Subarray 40.2% 适中 一维
153 Find Minimum in Rotated Sorted Array 51.5% 适中 旋转
154 Find Minimum in Rotated Sorted Array II 50.1% 困难 旋转
155 Min Stack 55.1% 简单 应用
156 Binary Tree Upside Down 74.5% 适中 不重要
157 Read N Characters Given Read4 51.1% 简单 实现题
158 Read N Characters Given Read4 II - Call multiple times 55.3% 困难 实现题
159 Longest Substring with At Most Two Distinct Characters 51.8% 适中 Substring&Sliding Window
160 Intersection of Two Linked Lists 56.2% 简单 数组相关
161 One Edit Distance 33% 适中 Java基础
162 Find Peak Element 47.3% 适中 基础
163 Missing Ranges 26.2% 简单 对比上一题
164 Maximum Gap 55.1% 困难 桶排序
165 Compare Version Numbers 42.6% 适中 Java基础
167 Two Sum II - Input array is sorted 56.5% 简单 基础
168 Excel Sheet Column Title 38.2% 简单 Java基础
169 Majority Element 64.3% 简单 数学定理
170 Two Sum III - Data structure design 41% 简单 HashMap
171 Excel Sheet Column Number 67.9% 简单 Java基础
172 Factorial Trailing Zeroes 39.9% 简单 特殊
173 Binary Search Tree Iterator 74.1% 适中 BST&Inorder
174 Dungeon Game 48.1% 困难 网格问题
179 Largest Number 36.9% 适中 不重要
186 Reverse Words in a String II 73.9% 适中 基础
187 Repeated DNA Sequences 45.1% 适中 Subsequence&HashSet
188 Best Time to Buy and Sell Stock IV 30.2% 困难 实现题
189 Rotate Array 42.7% 适中 交换
190 Reverse Bits 60.9% 简单 n&1
191 Number of 1 Bits 69.2% 简单 n-1
198 House Robber 46.5% 适中 实现题
199 Binary Tree Right Side View 64.2% 适中 BFS
200 Number of Islands 50.1% 适中 Flood Fill
201 Bitwise AND of Numbers Range 47.1% 适中 不重要
202 Happy Number 60.5% 简单 不重要
203 Remove Linked List Elements 46.1% 简单 删除
204 Count Primes 34.9% 简单 规律
205 Isomorphic Strings 47.3% 简单 计数排序
206 Reverse Linked List 70.3% 简单 反转
207 Course Schedule 54% 适中 拓扑排序
208 Implement Trie (Prefix Tree) 68.5% 适中 字典树
209 Minimum Size Subarray Sum 44.4% 适中 子数组
210 Course Schedule II 51.6% 适中 拓扑排序
211 Design Add and Search Words Data Structure 46% 适中 字典树
212 Word Search II 42.3% 困难 字典树
213 House Robber II 39.3% 适中 实现题
214 Shortest Palindrome 32.4% 困难 Palindrome
215 Kth Largest Element in an Array 64.4% 适中 基础
216 Combination Sum III 71.7% 适中 组合
217 Contains Duplicate 52.9% 简单 HashSet
218 The Skyline Problem 43.6% 困难 极难
219 Contains Duplicate II 40.1% 简单 HashSet
220 Contains Duplicate III 26.4% 适中 TreeSet&桶排序
221 Maximal Square 42.8% 适中 网格问题
222 Count Complete Tree Nodes 71.7% 适中 不重要
223 Rectangle Area 43.6% 适中 不重要
224 Basic Calculator 38.4% 困难 表达式计算
225 Implement Stack using Queues 65.5% 简单 应用
226 Invert Binary Tree 76.3% 简单 BFS
227 Basic Calculator II 37% 适中 表达式计算
228 Summary Ranges 53.5% 简单 Sliding Window
229 Majority Element II 43.5% 适中 实现题
230 Kth Smallest Element in a BST 71.6% 适中 BST&Inorder
231 Power of Two 48.5% 简单 n-1
232 Implement Queue using Stacks 64.9% 简单 应用
233 Number of Digit One 37.1% 困难 不重要
234 Palindrome Linked List 43.1% 简单 综合练习
235 Lowest Common Ancestor of a Binary Search Tree 64.8% 简单 BST
236 Lowest Common Ancestor of a Binary Tree 65% 适中 Postorder
237 Delete Node in a Linked List 82.6% 简单 删除
238 Product of Array Except Self 70.7% 适中 子数组
239 Sliding Window Maximum 48.8% 困难 Sliding Window&Deque
240 Search a 2D Matrix II 41.8% 适中 二维数组
241 Different Ways to Add Parentheses 72% 适中 Parentheses
242 Valid Anagram 61% 简单 Anagram
243 Shortest Word Distance 64.8% 简单 实现题
244 Shortest Word Distance II 51.6% 适中 HashMap
245 Shortest Word Distance III 60.8% 适中 实现题
246 Strobogrammatic Number 46.5% 简单 实现题
247 Strobogrammatic Number II 50.8% 适中 实现题
248 Strobogrammatic Number III 42.1% 困难 实现题
249 Group Shifted Strings 62% 适中 HashMap
250 Count Univalue Subtrees 63.9% 适中 Postorder
251 Flatten 2D Vector 53.2% 适中 实现题
252 Meeting Rooms 54.1% 简单 区间问题
253 Meeting Rooms II 45.9% 适中 区间问题
254 Factor Combinations 56.9% 适中 组合
255 Verify Preorder Sequence in Binary Search Tree 45.5% 适中 不重要
256 Paint House 57.2% 适中 实现题
257 Binary Tree Paths 64.8% 简单 Preorder
258 Add Digits 67.5% 简单 加减乘除
259 3Sum Smaller 55.8% 适中 三指针
260 Single Number III 73.4% 适中 不重要
261 Graph Valid Tree 47.7% 适中 并查集
263 Ugly Number 49.4% 简单 实现题
264 Ugly Number II 53.6% 适中 实现题
265 Paint House II 53.8% 困难 实现题
266 Palindrome Permutation 64.4% 简单 Palindrome
267 Palindrome Permutation II 41.6% 适中 Palindrome&Backtracking
268 Missing Number 56.7% 简单 异或
269 Alien Dictionary 33.5% 困难 拓扑排序
270 Closest Binary Search Tree Value 52% 简单 BST
271 Encode and Decode Strings 54% 适中 实现题
272 Closest Binary Search Tree Value II 61.9% 困难 BST&Inorder
273 Integer to English Words 28.4% 困难 实现题
274 H-Index 38.7% 适中 计数排序
275 H-Index II 41.6% 适中 基础
276 Paint Fence 45.6% 适中 实现题
277 Find the Celebrity 56.6% 适中 实现题
278 First Bad Version 40.3% 简单 基础
279 Perfect Squares 57.4% 适中 实现题
280 Wiggle Sort 68.3% 适中 交换
281 Zigzag Iterator 74.7% 适中 Iterator
282 Expression Add Operators 34% 困难 实现题
283 Move Zeroes 62% 简单 冒泡排序
284 Peeking Iterator 71.2% 适中 Iterator
285 Inorder Successor in BST 62.2% 适中 BST&Inorder
286 Walls and Gates 47.2% 适中 Flood Fill
287 Find the Duplicate Number 65.8% 适中 选择排序
288 Unique Word Abbreviation 33.1% 适中 HashMap
289 Game of Life 74.4% 适中 特殊
290 Word Pattern 43.3% 简单 HashMap
291 Word Pattern II 52.6% 适中 不重要
292 Nim Game 69.4% 简单 不重要
293 Flip Game 70.6% 简单 实现题
294 Flip Game II 57.5% 适中 实现题
295 Find Median from Data Stream 47.6% 困难 PriorityQueue
296 Best Meeting Point 59.7% 困难 实现题
297 Serialize and Deserialize Binary Tree 51.7% 困难 BST&Inorder
298 Binary Tree Longest Consecutive Sequence 56.1% 适中 Preorder
299 Bulls and Cows 48.3% 适中 计数排序
300 Longest Increasing Subsequence 45.1% 适中 字符串问题
301 Remove Invalid Parentheses 47.8% 困难 Parentheses&极难
302 Smallest Rectangle Enclosing Black Pixels 69.4% 困难 二维数组
303 Range Sum Query - Immutable 62.8% 简单 307,308基础
304 Range Sum Query 2D - Immutable 45.2% 适中 307,308基础
305 Number of Islands II 33.5% 困难 并查集
306 Additive Number 32.3% 适中 不重要
307 Range Sum Query - Mutable 56.4% 适中 树状数组,线断树
308 Range Sum Query 2D - Mutable 59.1% 困难 树状数组,线断树
309 Best Time to Buy and Sell Stock with Cooldown 57% 适中 实现题
310 Minimum Height Trees 34.4% 适中 BFS
311 Sparse Matrix Multiplication 74.7% 适中 不重要
312 Burst Balloons 66.9% 困难 超难
313 Super Ugly Number 63.5% 适中 基础
314 Binary Tree Vertical Order Traversal 54.7% 适中 难且重要
315 Count of Smaller Numbers After Self 41.3% 困难 递减
316 Remove Duplicate Letters 40.4% 适中 HashMap
317 Shortest Distance from All Buildings 47.5% 困难 Flood Fill
318 Maximum Product of Word Lengths 64.4% 适中 BitMap
319 Bulb Switcher 46.9% 适中 不重要
320 Generalized Abbreviation 65.2% 适中 实现题
321 Create Maximum Number 31% 困难 不重要
322 Coin Change 40.9% 适中 背包变形
323 Number of Connected Components in an Undirected Graph 59% 适中 并查集
324 Wiggle Sort II 35.9% 适中 不重要
325 Maximum Size Subarray Sum Equals k 49.9% 适中 子数组
326 Power of Three 47.1% 简单 不重要
327 Count of Range Sum 35.6% 困难 不重要
328 Odd Even Linked List 63.1% 适中 基础操作
329 Longest Increasing Path in a Matrix 46.2% 困难 Flood Fill
330 Patching Array 42.4% 困难 基础
331 Verify Preorder Serialization of a Binary Tree 45.2% 适中 不重要
332 Reconstruct Itinerary 39% 适中 转换图
333 Largest BST Subtree 43% 适中 不重要
334 Increasing Triplet Subsequence 38.9% 适中 选择排序
335 Self Crossing 33.7% 困难 不重要
336 Palindrome Pairs 39.6% 困难 Palindrome
337 House Robber III 60% 适中 Postorder
338 Counting Bits 75.6% 简单 不重要
339 Nested List Weight Sum 79.1% 适中 DFS,BFS
340 Longest Substring with At Most K Distinct Characters 48.2% 适中 Substring&Sliding Window
341 Flatten Nested List Iterator 64.2% 适中 Stack
342 Power of Four 49.2% 简单 不重要
344 Reverse String 71.3% 简单 基础
345 Reverse Vowels of a String 50.5% 简单 基础
346 Moving Average from Data Stream 68.3% 简单 Queue
347 Top K Frequent Elements 60.6% 适中 基础
348 Design Tic-Tac-Toe 58.1% 适中 实现题
349 Intersection of Two Arrays 70.4% 简单 基础
350 Intersection of Two Arrays II 52.5% 简单 HashMap
351 Android Unlock Patterns 57% 适中 不重要
353 Design Snake Game 41% 适中 边界
354 Russian Doll Envelopes 36.5% 困难 递增
355 Design Twitter 41.3% 适中 综合
356 Line Reflection 30.8% 适中 线
357 Count Numbers with Unique Digits 51.5% 适中 不重要
358 Rearrange String k Distance Apart 34.3% 困难 基础
359 Logger Rate Limiter 70.7% 简单 HashMap
360 Sort Transformed Array 60.4% 适中 不重要
361 Bomb Enemy 54.1% 适中 伪DP
362 Design Hit Counter 68% 适中 Queue
363 Max Sum of Rectangle No Larger Than K 38% 困难 TreeSet
364 Nested List Weight Sum II 70% 适中 DFS
365 Water and Jug Problem 35.1% 适中 数学定理
366 Find Leaves of Binary Tree 74.2% 适中 Postorder
367 Valid Perfect Square 43.4% 简单 开方
368 Largest Divisible Subset 38.2% 适中 不重要
369 Plus One Linked List 61.8% 适中 数组相关
370 Range Addition 66.8% 适中 实现题
371 Sum of Two Integers 55.8% 适中 不重要
372 Super Pow 43.7% 适中 不重要
373 Find K Pairs with Smallest Sums 42.9% 适中 基础
374 Guess Number Higher or Lower 45.3% 简单 基础
375 Guess Number Higher or Lower II 39.7% 适中 超难
376 Wiggle Subsequence 42.2% 适中 实现题
377 Combination Sum IV 42.8% 适中 背包变形
378 Kth Smallest Element in a Sorted Matrix 62.6% 适中 基础
379 Design Phone Directory 66.3% 适中 Queue
380 Insert Delete GetRandom O(1) 48.8% 适中 A&H
381 Insert Delete GetRandom O(1) - Duplicates allowed 38% 困难 A&H
382 Linked List Random Node 57.4% 适中 基础
383 Ransom Note 54.4% 简单 计数排序
384 Shuffle an Array 53.2% 适中 基础
385 Mini Parser 39.6% 适中 压栈匹配
386 Lexicographical Numbers 71.6% 适中 不重要
387 First Unique Character in a String 46.5% 简单 计数排序
388 Longest Absolute File Path 47.6% 适中 压栈匹配
389 Find the Difference 62.6% 简单 异或
390 Elimination Game 44.6% 适中 不重要
391 Perfect Rectangle 27% 困难 不重要
392 Is Subsequence 50.5% 简单 Subsequence
393 UTF-8 Validation 38.9% 适中 不重要
394 Decode String 53% 适中 压栈匹配
395 Longest Substring with At Least K Repeating Characters 44% 适中 Substring&Sliding Window
396 Rotate Function 40.2% 适中 不重要
397 Integer Replacement 36% 适中 特殊考察
398 Random Pick Index 62.3% 适中 基础
399 Evaluate Division 54.9% 适中 转换图
400 Nth Digit 38% 适中 不重要

重点250

1 Two Sum 49.3% 简单 HashMap 手写过
3 Longest Substring Without Repeating Characters 35.4% 适中 HashMap 看过思路
5 Longest Palindromic Substring 31.6% 适中 Palindrome
7 Reverse Integer 34.6% 简单 基础
8 String to Integer (atoi) 20.9% 适中 基础
10 Regular Expression Matching 30.2% 困难 超难
12 Integer to Roman 64.2% 适中 实现题
13 Roman to Integer 62% 简单 实现题
15 3Sum 29.1% 适中 求和
17 Letter Combinations of a Phone Number 54.3% 适中 实现题
18 4Sum 38.3% 适中 求和
20 Valid Parentheses 42.8% 简单 平衡符号
22 Generate Parentheses 76% 适中 Parentheses
23 Merge k Sorted Lists 52.8% 困难 数组相关&PriorityQueue
29 Divide Two Integers 20.1% 适中 加减乘除
31 Next Permutation 34.4% 适中 排列&规律
32 Longest Valid Parentheses 33.6% 困难 Parentheses
33 Search in Rotated Sorted Array 38.5% 适中 旋转
34 Find First and Last Position of Element in Sorted Array 40.2% 适中 基础
35 Search Insert Position 46.6% 简单 基础
36 Valid Sudoku 60.5% 适中 特殊
37 Sudoku Solver 62.4% 困难 特殊
38 Count and Say 56.2% 适中 实现题
39 Combination Sum 69.5% 适中 组合
40 Combination Sum II 62.5% 适中 组合
43 Multiply Strings 44.5% 适中 加减乘除
44 Wildcard Matching 31.2% 困难 超难
46 Permutations 76.7% 适中 排列
48 Rotate Image 69.2% 适中 二维数组
49 Group Anagrams 63.1% 适中 Group&Anagram
50 Pow(x, n) 36.4% 适中 开方
51 N-Queens 70.7% 困难 极难
52 N-Queens II 79.2% 困难 极难
53 Maximum Subarray 52.1% 简单 一维
54 Spiral Matrix 41% 适中 二维数组
59 Spiral Matrix II 78% 适中 二维数组
60 Permutation Sequence 49.1% 困难 排列&规律
62 Unique Paths 61.8% 适中 网格问题
64 Minimum Path Sum 67.5% 适中 网格问题
65 Valid Number 20.6% 困难
67 Add Binary 54.4% 简单 加减乘除
68 Text Justification 44.3% 困难 极难
69 Sqrt(x) 38.8% 简单 开方
70 Climbing Stairs 50.3% 简单 网格问题
71 Simplify Path 40.4% 适中 压栈匹配
72 Edit Distance 59.7% 困难 匹配问题
74 Search a 2D Matrix 38.7% 适中 二维数组
75 Sort Colors 55.3% 适中 荷兰国旗
76 Minimum Window Substring 38.8% 困难 Substring&Sliding Window
77 Combinations 74.5% 适中 组合
78 Subsets 77.8% 适中 子集&位运算
79 Word Search 42.3% 适中 Flood Fill
81 Search in Rotated Sorted Array II 35.8% 适中 旋转
82 Remove Duplicates from Sorted List II 48.9% 适中 删除
84 Largest Rectangle in Histogram 41.4% 困难 迭代极值
85 Maximal Rectangle 47.6% 困难 迭代极值
88 Merge Sorted Array 48.4% 简单 合并排序
90 Subsets II 60.7% 适中 子集
91 Decode Ways 24.3% 适中 匹配问题
96 Unique Binary Search Trees 69.1% 适中 结合
98 Validate Binary Search Tree 32.2% 适中 双Pre
101 Symmetric Tree 52.8% 简单 双Pre
104 Maximum Depth of Binary Tree 74.8% 简单 Postorder
108 Convert Sorted Array to Binary Search Tree 73.9% 简单 BST
110 Balanced Binary Tree 54.5% 简单 Postorder
111 Minimum Depth of Binary Tree 43.2% 简单 双Pre
112 Path Sum 51% 简单 双Pre
113 Path Sum II 60.8% 适中 Preorder
115 Distinct Subsequences 48.7% 困难 匹配问题
116 Populating Next Right Pointers in Each Node 62.2% 适中 难且重要
117 Populating Next Right Pointers in Each Node II 51.2% 适中 难且重要
124 Binary Tree Maximum Path Sum 43% 困难 Postorder
125 Valid Palindrome 46.2% 简单 Palindrome
126 Word Ladder II 38.5% 困难 拓扑排序
127 Word Ladder 43.2% 困难 BFS
130 Surrounded Regions 42.2% 适中 FloodFill
133 Clone Graph 64.6% 适中 基础
138 Copy List with Random Pointer 55.9% 适中 基础
139 Word Break 47.4% 适中 字符串问题
140 Word Break II 38.5% 困难 实现题
142 Linked List Cycle II 51.5% 适中
149 Max Points on a Line 23% 困难 点线
150 Evaluate Reverse Polish Notation 50.4% 适中 表达式计算
152 Maximum Product Subarray 40.2% 适中 一维
153 Find Minimum in Rotated Sorted Array 51.5% 适中 旋转
154 Find Minimum in Rotated Sorted Array II 50.1% 困难 旋转
155 Min Stack 55.1% 简单 应用
157 Read N Characters Given Read4 51.1% 简单 实现题
158 Read N Characters Given Read4 II - Call multiple times 55.3% 困难 实现题
161 One Edit Distance 33% 适中 Java基础
162 Find Peak Element 47.3% 适中 基础
163 Missing Ranges 26.2% 简单 对比上一题
168 Excel Sheet Column Title 38.2% 简单 Java基础
171 Excel Sheet Column Number 67.9% 简单 Java基础
173 Binary Search Tree Iterator 74.1% 适中 BST&Inorder
174 Dungeon Game 48.1% 困难 网格问题
191 Number of 1 Bits 69.2% 简单 n-1
198 House Robber 46.5% 适中 实现题
200 Number of Islands 50.1% 适中 Flood Fill
201 Bitwise AND of Numbers Range 47.1% 适中 不重要
202 Happy Number 60.5% 简单 不重要
204 Count Primes 34.9% 简单 规律
207 Course Schedule 54% 适中 拓扑排序
208 Implement Trie (Prefix Tree) 68.5% 适中 字典树
209 Minimum Size Subarray Sum 44.4% 适中 子数组
210 Course Schedule II 51.6% 适中 拓扑排序
211 Design Add and Search Words Data Structure 46% 适中 字典树
212 Word Search II 42.3% 困难 字典树
213 House Robber II 39.3% 适中 实现题
214 Shortest Palindrome 32.4% 困难 Palindrome
215 Kth Largest Element in an Array 64.4% 适中 基础
216 Combination Sum III 71.7% 适中 组合
218 The Skyline Problem 43.6% 困难 极难
221 Maximal Square 42.8% 适中 网格问题
224 Basic Calculator 38.4% 困难 表达式计算
225 Implement Stack using Queues 65.5% 简单 应用
226 Invert Binary Tree 76.3% 简单 BFS
227 Basic Calculator II 37% 适中 表达式计算
228 Summary Ranges 53.5% 简单 Sliding Window
230 Kth Smallest Element in a BST 71.6% 适中 BST&Inorder
231 Power of Two 48.5% 简单 n-1
232 Implement Queue using Stacks 64.9% 简单 应用
235 Lowest Common Ancestor of a Binary Search Tree 64.8% 简单 BST
236 Lowest Common Ancestor of a Binary Tree 65% 适中 Postorder
238 Product of Array Except Self 70.7% 适中 子数组
240 Search a 2D Matrix II 41.8% 适中 二维数组
241 Different Ways to Add Parentheses 72% 适中 Parentheses
249 Group Shifted Strings 62% 适中 HashMap
251 Flatten 2D Vector 53.2% 适中 实现题
254 Factor Combinations 56.9% 适中 组合
256 Paint House 57.2% 适中 实现题
257 Binary Tree Paths 64.8% 简单 Preorder
261 Graph Valid Tree 47.7% 适中 并查集
263 Ugly Number 49.4% 简单 实现题
264 Ugly Number II 53.6% 适中 实现题
265 Paint House II 53.8% 困难 实现题
268 Missing Number 56.7% 简单 异或
269 Alien Dictionary 33.5% 困难 拓扑排序
270 Closest Binary Search Tree Value 52% 简单 BST
271 Encode and Decode Strings 54% 适中 实现题
273 Integer to English Words 28.4% 困难 实现题
276 Paint Fence 45.6% 适中 实现题
278 First Bad Version 40.3% 简单 基础
279 Perfect Squares 57.4% 适中 实现题
280 Wiggle Sort 68.3% 适中 交换
282 Expression Add Operators 34% 困难 实现题
283 Move Zeroes 62% 简单 冒泡排序
284 Peeking Iterator 71.2% 适中 Iterator
285 Inorder Successor in BST 62.2% 适中 BST&Inorder
286 Walls and Gates 47.2% 适中 Flood Fill
288 Unique Word Abbreviation 33.1% 适中 HashMap
291 Word Pattern II 52.6% 适中 不重要
296 Best Meeting Point 59.7% 困难 实现题
297 Serialize and Deserialize Binary Tree 51.7% 困难 BST&Inorder
298 Binary Tree Longest Consecutive Sequence 56.1% 适中 Preorder
300 Longest Increasing Subsequence 45.1% 适中 字符串问题
301 Remove Invalid Parentheses 47.8% 困难 Parentheses&极难
302 Smallest Rectangle Enclosing Black Pixels 69.4% 困难 二维数组
305 Number of Islands II 33.5% 困难 并查集
307 Range Sum Query - Mutable 56.4% 适中 树状数组,线断树
308 Range Sum Query 2D - Mutable 59.1% 困难 树状数组,线断树
311 Sparse Matrix Multiplication 74.7% 适中 不重要
312 Burst Balloons 66.9% 困难 超难
314 Binary Tree Vertical Order Traversal 54.7% 适中 难且重要
316 Remove Duplicate Letters 40.4% 适中 HashMap
317 Shortest Distance from All Buildings 47.5% 困难 Flood Fill
318 Maximum Product of Word Lengths 64.4% 适中 BitMap
322 Coin Change 40.9% 适中 背包变形
323 Number of Connected Components in an Undirected Graph 59% 适中 并查集
324 Wiggle Sort II 35.9% 适中 不重要
325 Maximum Size Subarray Sum Equals k 49.9% 适中 子数组
329 Longest Increasing Path in a Matrix 46.2% 困难 Flood Fill
336 Palindrome Pairs 39.6% 困难 Palindrome
337 House Robber III 60% 适中 Postorder
338 Counting Bits 75.6% 简单 不重要
339 Nested List Weight Sum 79.1% 适中 DFS,BFS
340 Longest Substring with At Most K Distinct Characters 48.2% 适中 Substring&Sliding Window
341 Flatten Nested List Iterator 64.2% 适中 Stack
346 Moving Average from Data Stream 68.3% 简单 Queue
348 Design Tic-Tac-Toe 58.1% 适中 实现题
350 Intersection of Two Arrays II 52.5% 简单 HashMap
351 Android Unlock Patterns 57% 适中 不重要
353 Design Snake Game 41% 适中 边界
354 Russian Doll Envelopes 36.5% 困难 递增
359 Logger Rate Limiter 70.7% 简单 HashMap
361 Bomb Enemy 54.1% 适中 伪DP
362 Design Hit Counter 68% 适中 Queue
364 Nested List Weight Sum II 70% 适中 DFS
367 Valid Perfect Square 43.4% 简单 开方
374 Guess Number Higher or Lower 45.3% 简单 基础
375 Guess Number Higher or Lower II 39.7% 适中 超难
376 Wiggle Subsequence 42.2% 适中 实现题
377 Combination Sum IV 42.8% 适中 背包变形
378 Kth Smallest Element in a Sorted Matrix 62.6% 适中 基础
379 Design Phone Directory 66.3% 适中 Queue
380 Insert Delete GetRandom O(1) 48.8% 适中 A&H
381 Insert Delete GetRandom O(1) - Duplicates allowed 38% 困难 A&H
384 Shuffle an Array 53.2% 适中 基础
385 Mini Parser 39.6% 适中 压栈匹配
389 Find the Difference 62.6% 简单 异或
394 Decode String 53% 适中 压栈匹配
398 Random Pick Index 62.3% 适中 基础

推荐的资源和网课

九章算法

九章算法班 2023版 - 九章算法 - 帮助更多程序员找到好工作,硅谷顶尖IT企业工程师实时在线授课为你传授面试技巧

左程云

配套资源

算法第四版
以及网站

你可能感兴趣的:(LeetCode,java)