|
1 |
Two Sum |
100 |
|
|
|
2 |
Add Two Numbers |
80 |
|
|
|
3 |
Longest Substring Without Repeating Characters |
- |
|
这个系列的所有题都要多做几遍 |
|
4 |
Median of Two Sorted Arrays |
70 |
|
这题很经典,多做几遍 |
|
5 |
Longest Palindromic Substring |
85 |
|
这题对比动态规划和最优算法 |
|
6 |
ZigZag Conversion |
|
|
|
|
7 |
Reverse Integer |
95 |
|
|
|
8 |
String to Integer (atoi) |
90 |
|
很考代码能力,容易错 |
|
9 |
Palindrome Number |
|
|
|
通过 |
10 |
正则表达式匹配 |
60 |
递归法 |
这题很经典,多做几遍,和#44一起 |
|
11 |
Container With Most Water |
|
|
|
|
12 |
Integer to Roman |
|
|
|
|
13 |
Roman to Integer |
|
|
|
|
14 |
Longest Common Prefix |
双指针 |
|
|
通过 |
15 |
3Sum |
70 |
|
|
|
16 |
3Sum Closest |
|
|
|
通过 |
17 |
Letter Combinations of a Phone Number |
85 |
递归/回溯:最后一次递归才加入结果列表 |
|
|
18 |
4Sum |
|
|
|
两次遍历法待做 |
19 |
删除链表的倒数第N个节点 |
medium |
两次遍历法/一次遍历算法 |
两次遍历法和一次遍历法 |
|
20 |
有效的括号 |
100 |
|
|
|
21 |
Merge Two Sorted Lists |
90 |
|
|
|
22 |
Generate Parentheses |
80 |
|
这题看两遍 |
|
23 |
Merge k Sorted Lists |
70 |
|
|
|
24 |
Swap Nodes in Pairs |
|
|
|
|
25 |
Reverse Nodes in k-Group |
80 |
|
|
|
26 |
Remove Duplicates from Sorted Array |
80 |
|
|
|
27 |
Remove Element |
|
|
|
|
28 |
Implement strStr() |
70 |
|
|
|
29 |
Divide Two Integers |
|
|
|
|
30 |
Substring with Concatenation of All Words |
|
|
|
|
31 |
Next Permutation |
|
|
|
|
32 |
Longest Valid Parentheses |
|
|
|
|
33 |
Search in Rotated Sorted Array |
80 |
|
|
|
34 |
Search for a Range |
|
|
|
|
35 |
Search Insert Position |
|
|
|
|
36 |
Valid Sudoku |
80 |
|
|
|
37 |
Sudoku Solver |
70 |
|
这道题是典型的back tracking,多做几遍 |
|
38 |
Count and Say |
80 |
|
|
|
39 |
Combination Sum |
70 |
|
排列组合系列的题要多做几遍 |
|
40 |
Combination Sum II |
70 |
|
|
|
41 |
First Missing Positive |
|
|
|
|
42 |
Trapping Rain Water |
95 |
|
|
|
43 |
Multiply Strings |
80 |
|
|
|
44 |
Wildcard Matching |
60 |
|
和#10多做几遍 |
|
45 |
Jump Game II |
|
|
|
|
46 |
Permutations |
|
|
|
|
47 |
Permutations II |
70 |
|
多做几遍 |
|
48 |
Rotate Image |
100 |
|
|
|
49 |
Group Anagrams |
95 |
|
|
|
50 |
Pow(x, n) |
80 |
|
|
|
51 |
N-Queens |
|
|
|
|
52 |
N-Queens II |
|
|
|
通过 |
53 |
最大子序和 |
easy |
动态规划法 |
DP算法 : T=O(N),S=O(1).利用nums数组本身作为DP数组 |
|
54 |
Spiral Matrix |
85 |
|
|
|
55 |
Jump Game |
|
贪心法 |
|
|
56 |
Merge Intervals |
70 |
|
|
|
57 |
Insert Interval |
75 |
|
这题要多做几遍 |
|
60 |
Permutation Sequence |
70 |
|
这题思路巧妙,多做两遍 |
|
61 |
Rotate List |
90 |
|
|
通过 |
62 |
不同的路径 |
medium |
排列组合法/DP算法 |
排列组合法: 将机器人行列要走的轨迹当作要选择的方块 |
通过 |
63 |
不同的路径2 |
medium |
DP算法 |
DP算法,可以利用原先矩阵将空间复杂度降为 O(1) |
|
66 |
Plus One |
100 |
|
这题多看一遍 |
|
67 |
Add Binary |
100 |
|
|
|
68 |
Text Justification |
|
|
|
|
69 |
Sqrt(x) |
85 |
|
|
通过 |
70 |
爬楼梯 |
easy |
迭代法/动态规划法/递归法 |
|
|
71 |
Simplify Path |
80 |
|
|
|
72 |
Edit Distance |
75 |
|
|
|
73 |
Set Matrix Zeroes |
90 |
|
|
|
74 |
Search a 2D Matrix |
|
|
|
|
75 |
Sort Colors |
65 |
|
这题多做几遍,很有意思 |
|
76 |
Minimum Window Substring |
50 |
|
这题以及类似的题一定要多做几遍,很经典,参见window |
|
77 |
Combinations |
|
|
|
|
78 |
Subsets |
85 |
|
|
|
79 |
Word Search |
85 |
|
|
|
80 |
Remove Duplicates from Sorted Array II |
100 |
|
|
|
81 |
Search in Rotated Sorted Array II |
70 |
|
|
|
82 |
Remove Duplicates from Sorted List II |
75 |
|
|
|
83 |
Remove Duplicates from Sorted List |
100 |
|
|
|
84 |
Largest Rectangle in Histogram |
70 |
|
|
|
85 |
Maximal Rectangle |
75 |
|
|
|
86 |
Partition List |
90 |
|
|
|
88 |
Merge Sorted Array |
100 |
|
|
|
90 |
Subsets II |
80 |
|
|
|
91 |
Decode Ways |
75 |
|
这题多做几遍,包括#639 |
|
92 |
Reverse Linked List II |
80 |
|
|
|
93 |
Restore IP Addresses |
80 |
|
多看两遍 |
|
94 |
Binary Tree Inorder Traversal |
100 |
|
|
|
95 |
Unique Binary Search Trees II |
70 |
|
多做几遍,递归和DP |
|
96 |
Unique Binary Search Trees |
80 |
|
|
|
98 |
Validate Binary Search Tree |
85 |
|
注意溢出 |
|
99 |
Recover Binary Search Tree |
60 |
|
这题很容易错,要多做几遍 |
|
100 |
Same Tree |
100 |
|
|
|
101 |
对称二叉树 |
95 |
|
|
|
102 |
Binary Tree Level Order Traversal |
85 |
|
|
|
103 |
Binary Tree Zigzag Level Order Traversal |
80 |
|
|
|
104 |
二叉树的最大深度 |
100 |
|
|
|
105 |
Construct Binary Tree from Preorder and Inorder Traversal |
95 |
|
|
|
106 |
Construct Binary Tree from Inorder and Postorder Traversal |
90 |
|
|
|
107 |
Binary Tree Level Order Traversal II |
100 |
|
|
|
108 |
Convert Sorted Array to Binary Search Tree |
100 |
|
|
|
109 |
Convert Sorted List to Binary Search Tree |
90 |
|
|
|
110 |
平衡二叉树 |
80 |
|
|
|
111 |
Minimum Depth of Binary Tree |
80 |
|
|
|
112 |
Path Sum |
85 |
|
|
|
113 |
Path Sum II |
65 |
|
错了好几次,得多做几遍 |
|
114 |
Flatten Binary Tree to Linked List |
80 |
|
|
|
116 |
Populating Next Right Pointers in Each Node |
80 |
|
|
|
117 |
Populating Next Right Pointers in Each Node II |
80 |
|
|
|
118 |
Pascal's Triangle |
80 |
|
|
|
119 |
Pascal's Triangle II |
80 |
|
|
通过 |
120 |
三角形最小路径和 |
medium |
基本的dp算法 |
自上而下,自下而上的方法,可用 dp[][],dp[] 两种辅助空间 |
|
121 |
Best Time to Buy and Sell Stock |
100 |
|
|
|
122 |
Best Time to Buy and Sell Stock II |
100 |
|
|
|
123 |
Best Time to Buy and Sell Stock III |
75 |
|
|
|
124 |
Binary Tree Maximum Path Sum |
60 |
|
|
|
125 |
Valid Palindrome |
100 |
|
|
|
126 |
Word Ladder II |
|
|
|
|
127 |
Word Ladder |
70 |
|
此题非常经典,务必连同ii多做几遍,将双端BFS吃透 |
|
128 |
Longest Consecutive Sequence |
60 |
|
|
|
129 |
Sum Root to Leaf Numbers |
100 |
|
|
|
130 |
Surrounded Regions |
65 |
|
|
|
131 |
Palindrome Partitioning |
|
|
|
|
132 |
Palindrome Partitioning II |
|
|
|
|
133 |
Clone Graph |
70 |
|
这题不难,多看两遍,BFS方法再做两遍 |
|
135 |
Candy |
80 |
|
|
|
138 |
Copy List with Random Pointer |
95 |
|
有一个易错点 |
|
139 |
Word Break |
80 |
|
多看两遍 |
|
140 |
Word Break II |
75 |
|
这题多做两遍,很典型 |
|
141 |
Linked List Cycle |
75 |
|
|
|
142 |
Linked List Cycle II |
90 |
|
|
|
143 |
Reorder List |
90 |
|
|
|
144 |
Binary Tree Preorder Traversal |
85 |
|
|
|
145 |
Binary Tree Postorder Traversal |
80 |
|
|
|
146 |
LRU Cache |
95 |
|
好题目,多做几遍 |
|
147 |
Insertion Sort List |
90 |
|
|
|
148 |
Sort List |
90 |
|
|
|
149 |
Max Points on a Line |
60 |
|
|
|
150 |
Evaluate Reverse Polish Notation |
70 |
|
|
|
151 |
Reverse Words in a String |
70 |
|
这题虽然不难,但是也错了几次 |
|
152 |
Maximum Product Subarray |
|
|
|
|
153 |
Find Minimum in Rotated Sorted Array |
|
|
|
|
154 |
Find Minimum in Rotated Sorted Array II |
|
|
|
|
155 |
Min Stack |
95 |
|
|
|
156 |
Binary Tree Upside Down |
70 |
|
这道题挺有意思,多做几遍 |
|
157 |
Read N Characters Given Read4 |
80 |
|
这题多做几遍,结合#158 |
|
158 |
Read N Characters Given Read4 II - Call multiple times |
70 |
|
|
|
159 |
Longest Substring with At Most Two Distinct Characters |
100 |
|
多看两遍 |
|
160 |
Intersection of Two Linked Lists |
100 |
|
|
|
161 |
One Edit Distance |
85 |
|
和#72做两遍 |
|
162 |
Find Peak Element |
90 |
|
|
|
163 |
Missing Ranges |
65 |
|
多做几遍,太容易错了 |
|
164 |
Maximum Gap |
65 |
|
|
|
167 |
Two Sum II - Input array is sorted |
100 |
|
|
|
168 |
Excel Sheet Column Title |
|
|
|
|
169 |
Majority Element |
100 |
|
|
|
170 |
Two Sum III - Data structure design |
100 |
|
这道题再多做一遍 |
|
171 |
Excel Sheet Column Number |
|
|
|
|
172 |
Factorial Trailing Zeroes |
100 |
|
|
|
173 |
Binary Search Tree Iterator |
70 |
|
多留意一下 |
|
179 |
Largest Number |
90 |
|
|
|
186 |
Reverse Words in a String II |
90 |
|
|
|
188 |
Best Time to Buy and Sell Stock IV |
|
|
|
|
189 |
Rotate Array |
100 |
|
|
|
190 |
Reverse Bits |
85 |
|
|
|
198 |
打家劫舍 |
80 |
|
|
|
199 |
Binary Tree Right Side View |
80 |
|
|
|
200 |
Number of Islands |
85 |
|
这道题很经典,而且方法不止一种,每种方法都多做几遍,包括UF,#305 |
|
203 |
Remove Linked List Elements |
|
|
|
|
204 |
Count Primes |
85 |
|
|
|
206 |
Reverse Linked List |
90 |
|
|
|
207 |
Course Schedule |
100 |
|
典型的拓扑排序 |
|
208 |
Implement Trie (Prefix Tree) |
80 |
|
和#211多留意,trie很典型 |
|
209 |
Minimum Size Subarray Sum |
85 |
|
|
|
210 |
Course Schedule II |
95 |
|
|
|
211 |
Add and Search Word - Data structure design |
85 |
|
|
|
212 |
Word Search II |
|
|
|
|
213 |
House Robber II |
80 |
|
|
|
214 |
Shortest Palindrome |
|
|
|
|
215 |
Kth Largest Element in an Array |
65 |
|
这题很经典,三种解法都要了然于胸 |
|
216 |
Combination Sum III |
65 |
|
|
|
217 |
Contains Duplicate |
100 |
|
|
|
218 |
The Skyline Problem |
60 |
|
这题多做两遍 |
|
219 |
Contains Duplicate II |
95 |
|
|
|
220 |
Contains Duplicate III |
65 |
|
|
|
221 |
Maximal Square |
80 |
|
|
|
222 |
Count Complete Tree Nodes |
70 |
|
一般的做法会超时 |
|
223 |
Rectangle Area |
95 |
|
|
|
224 |
Basic Calculator |
80 |
|
|
|
225 |
Implement Stack using Queues |
90 |
|
|
|
226 |
Invert Binary Tree |
80 |
|
|
|
228 |
Summary Ranges |
70 |
|
|
|
229 |
Majority Element II |
70 |
|
|
|
230 |
Kth Smallest Element in a BST |
85 |
|
注意Follow Up |
|
232 |
Implement Queue using Stacks |
95 |
|
|
|
233 |
Number of Digit One |
|
|
|
|
234 |
Palindrome Linked List |
75 |
|
|
|
235 |
Lowest Common Ancestor of a Binary Search Tree |
100 |
|
|
|
236 |
Lowest Common Ancestor of a Binary Tree |
50 |
|
这题很经典,多做几遍,留意节点不在树中的情况 |
|
237 |
Delete Node in a Linked List |
100 |
|
|
|
238 |
Product of Array Except Self |
85 |
|
|
|
239 |
Sliding Window Maximum |
75 |
|
这题非常经典,多做几遍,包括常规算法(优先队列,treemap)及优化算法双端队列 |
|
240 |
Search a 2D Matrix II |
100 |
|
|
|
241 |
Different Ways to Add Parentheses |
|
|
|
|
242 |
Valid Anagram |
100 |
|
|
|
243 |
Shortest Word Distance |
80 |
|
|
|
244 |
Shortest Word Distance II |
80 |
|
|
|
245 |
Shortest Word Distance III |
80 |
|
|
|
246 |
Strobogrammatic Number |
70 |
|
#247一个系列,多看两遍 |
|
247 |
Strobogrammatic Number II |
70 |
|
多看两遍 |
|
249 |
Group Shifted Strings |
|
|
|
|
250 |
Count Univalue Subtrees |
70 |
|
这题要多做几遍 |
|
251 |
Flatten 2D Vector |
100 |
|
|
|
252 |
Meeting Rooms |
100 |
|
|
|
253 |
Meeting Rooms II |
90 |
|
|
|
254 |
Factor Combinations |
80 |
|
|
|
255 |
Verify Preorder Sequence in Binary Search Tree |
85 |
|
很简单,粗心错了 |
|
256 |
Paint House |
95 |
|
|
|
257 |
Binary Tree Paths |
80 |
|
|
|
259 |
3Sum Smaller |
95 |
|
这题虽然简单,但是因为思维定式还是错了几次 |
|
261 |
Graph Valid Tree |
70 |
|
这题多做几遍 |
|
263 |
Ugly Number |
85 |
|
|
|
264 |
Ugly Number II |
70 |
|
|
|
265 |
Paint House II |
60 |
|
|
|
266 |
Palindrome Permutation |
100 |
|
|
|
267 |
Palindrome Permutation II |
80 |
|
典型,多看两遍 |
|
268 |
Missing Number |
100 |
|
|
|
269 |
Alien Dictionary |
70 |
|
这题要多做几遍 |
|
270 |
Closest Binary Search Tree Value |
90 |
|
|
|
271 |
Encode and Decode Strings |
65 |
|
思路巧妙,多看几遍 |
|
272 |
Closest Binary Search Tree Value II |
60 |
|
这题非常值得多做几遍,几种写法都试试 |
|
273 |
Integer to English Words |
75 |
|
多做几遍,做到bug free |
|
274 |
H-Index |
80 |
|
|
|
275 |
H-Index II |
75 |
|
|
|
277 |
Find the Celebrity |
100 |
|
|
|
278 |
First Bad Version |
100 |
|
|
|
279 |
Perfect Squares |
95 |
|
|
|
280 |
Wiggle Sort |
80 |
|
思路巧妙,多看两遍 |
|
281 |
Zigzag Iterator |
85 |
|
多做三遍,考虑扩展到k的情况 |
|
282 |
Expression Add Operators |
50 |
|
|
|
283 |
Move Zeroes |
100 |
|
|
|
284 |
Peeking Iterator |
100 |
|
|
|
285 |
Inorder Successor in BST |
70 |
|
这道题有意思,要多做几遍 |
|
286 |
Walls and Gates |
70 |
|
多看两遍 |
|
287 |
Find the Duplicate Number |
|
|
|
|
288 |
Unique Word Abbreviation |
70 |
|
这题不难,多做两遍,题目意思容易理解错 |
|
289 |
Game of Life |
70 |
|
|
|
293 |
Flip Game |
90 |
|
|
|
294 |
Flip Game II |
90 |
|
|
|
295 |
Find Median from Data Stream |
|
|
|
|
297 |
Serialize and Deserialize Binary Tree |
80 |
|
好题目,多做做,递归的非递归的 |
|
298 |
Binary Tree Longest Consecutive Sequence |
70 |
|
多做三遍,尽可能简洁 |
|
299 |
猜数字游戏 |
|
|
两次遍历,一次遍历 |
|
300 |
Longest Increasing Subsequence |
|
|
|
|
301 |
Remove Invalid Parentheses |
70 |
|
比较难,多做几遍 |
|
302 |
Smallest Rectangle Enclosing Black Pixels |
|
|
|
|
303 |
Range Sum Query - Immutable |
100 |
|
|
|
304 |
Range Sum Query 2D - Immutable |
65 |
|
|
|
305 |
Number of Islands II |
70 |
|
这题多做几遍,经典的UF |
|
307 |
Range Sum Query - Mutable |
70 |
|
和#303, #304, #308定要多做几遍,掌握BIT |
|
308 |
Range Sum Query 2D - Mutable |
70 |
|
|
|
309 |
Best Time to Buy and Sell Stock with Cooldown |
|
|
|
|
310 |
Minimum Height Trees |
60 |
|
这题多做几遍 |
|
311 |
Sparse Matrix Multiplication |
80 |
|
|
|
312 |
Burst Balloons |
60 |
|
|
|
313 |
Super Ugly Number |
|
|
|
|
314 |
Binary Tree Vertical Order Traversal |
80 |
|
|
|
315 |
Count of Smaller Numbers After Self |
60 |
|
|
|
316 |
去除重复字母 |
70 |
|
|
|
317 |
Shortest Distance from All Buildings |
75 |
|
典型的bfs,多做两遍 |
|
319 |
Bulb Switcher |
90 |
|
|
|
320 |
Generalized Abbreviation |
70 |
|
这题是典型的back tracking,多做几遍 |
|
322 |
Coin Change |
80 |
|
|
|
323 |
Number of Connected Components in an Undirected Graph |
90 |
|
典型的图,多看两遍 |
|
324 |
Wiggle Sort II |
60 |
|
|
|
325 |
Maximum Size Subarray Sum Equals k |
75 |
|
这题思路有意思,多做几遍 |
|
328 |
Odd Even Linked List |
90 |
|
|
|
329 |
Longest Increasing Path in a Matrix |
70 |
|
这题要多做几遍 |
|
332 |
Reconstruct Itinerary |
|
|
|
|
333 |
Largest BST Subtree |
50 |
|
这道题虽然不难,但是折腾了很久,一定要多做 |
|
334 |
Increasing Triplet Subsequence |
75 |
|
|
|
335 |
Self Crossing |
80 |
|
|
|
336 |
Palindrome Pairs |
|
|
|
|
337 |
House Robber III |
70 |
|
建议再做两遍 |
|
339 |
Nested List Weight Sum |
|
|
|
|
340 |
Longest Substring with At Most K Distinct Characters |
80 |
|
和#159类似 |
|
341 |
Flatten Nested List Iterator |
75 |
|
这题有点意思,多做两遍 |
|
344 |
Reverse String |
100 |
|
|
|
345 |
Reverse Vowels of a String |
100 |
|
|
|
346 |
Moving Average from Data Stream |
95 |
|
|
|
347 |
Top K Frequent Elements |
85 |
|
|
|
349 |
Intersection of Two Arrays |
|
|
|
|
350 |
Intersection of Two Arrays II |
|
|
|
|
351 |
Android Unlock Patterns |
70 |
|
这题多做几遍 |
|
357 |
Count Numbers with Unique Digits |
|
|
|
|
358 |
Rearrange String k Distance Apart |
|
|
|
|
359 |
Logger Rate Limiter |
100 |
|
这题如果不考虑空间消耗的话其实很简单 |
|
361 |
Bomb Enemy |
65 |
|
这题多做几遍,开始没思路 |
|
364 |
Nested List Weight Sum II |
|
|
|
|
366 |
Find Leaves of Binary Tree |
60 |
|
这道题刚开始还没思路 |
|
367 |
Valid Perfect Square |
|
|
|
|
369 |
Plus One Linked List |
100 |
|
|
|
370 |
Range Addition |
80 |
|
|
|
373 |
Find K Pairs with Smallest Sums |
|
|
|
|
374 |
Guess Number Higher or Lower |
100 |
|
|
|
375 |
Guess Number Higher or Lower II |
60 |
|
|
|
377 |
Combination Sum IV |
65 |
|
|
|
378 |
Kth Smallest Element in a Sorted Matrix |
|
|
|
|
380 |
Insert Delete GetRandom O(1) |
75 |
|
这道题很有意思,多做几遍 |
|
381 |
Insert Delete GetRandom O(1) - Duplicates allowed |
|
|
|
|
382 |
Linked List Random Node |
|
|
|
|
384 |
Shuffle an Array |
75 |
|
|
|
387 |
First Unique Character in a String |
100 |
|
|
|
388 |
Longest Absolute File Path |
65 |
|
其实不难,乍看没思路,多做几遍 |
|
391 |
Perfect Rectangle |
70 |
|
这题很trick,多做两遍 |
通过 |
392 |
判断子序列 |
esay |
贪心算法/DP算法 |
DP算法:不建议使用,纯粹学习思想 |
|
393 |
UTF-8 Validation |
60 |
|
错了很多次,多做几遍 |
|
394 |
Decode String |
75 |
|
这题容易错,多做四遍 |
|
395 |
Longest Substring with At Least K Repeating Characters |
65 |
|
|
|
398 |
Random Pick Index |
80 |
|
|
|
399 |
Evaluate Division |
60 |
|
这题多做几遍 |
|
401 |
Binary Watch |
|
|
|
|
404 |
Sum of Left Leaves |
80 |
|
|
|
406 |
根据身高重建队列 |
60 |
|
这题开始没思路,多做几遍 |
|
407 |
Trapping Rain Water II |
|
|
|
|
408 |
Valid Word Abbreviation |
80 |
|
多做两遍 |
|
409 |
Longest Palindrome |
|
|
|
|
410 |
Split Array Largest Sum |
|
|
|
|
412 |
Fizz Buzz |
100 |
|
|
|
413 |
Third Maximum Number |
80 |
|
|
|
418 |
Sentence Screen Fitting |
65 |
|
这题思路巧妙,多做几遍,常规思路超时 |
|
422 |
Valid Word Square |
90 |
|
|
|
425 |
Word Squares |
70 |
|
这题很典型,多做几遍 |
|
436 |
Find Right Interval |
|
|
|
|
437 |
Path Sum III |
60 |
|
这道题错了很多遍,要重点关注 |
|
438 |
Find All Anagrams in a String |
75 |
|
这道题非常经典,最优解法需要多做几遍,保证once bug free |
|
442 |
Find All Duplicates in an Array |
80 |
|
|
|
445 |
Add Two Numbers II |
80 |
|
|
|
448 |
Find All Numbers Disappeared in an Array |
80 |
|
|
|
449 |
Serialize and Deserialize BST |
90 |
|
和#297一样 |
通过 |
450 |
Delete Node in a BST |
60 |
|
这题非常经典,值得多做十遍 |
|
451 |
Sort Characters By Frequency |
|
|
|
通过 |
455 |
分发饼干 |
esay |
贪心算法 |
贪心算法 |
|
458 |
可怜的小猪 |
Hard |
|
|
|
459 |
Repeated Substring Pattern |
|
|
|
|
477 |
Total Hamming Distance |
|
|
|
|
480 |
Sliding Window Median |
70 |
|
|
|
482 |
License Key Formatting |
90 |
|
|
|
483 |
Smallest Good Base |
|
|
|
|
485 |
Max Consecutive Ones |
100 |
|
|
|
487 |
Max Consecutive Ones II |
80 |
|
|
|
501 |
Find Mode in Binary Search Tree |
70 |
|
不难,容易错,多做两次 |
|
508 |
Most Frequent Subtree Sum |
|
|
|
|
513 |
Find Bottom Left Tree Value |
100 |
|
|
|
515 |
Find Largest Value in Each Tree Row |
100 |
|
|
|
524 |
Longest Word in Dictionary through Deleting |
|
|
|
|
526 |
Beautiful Arrangement |
80 |
|
|
|
535 |
Encode and Decode TinyURL |
100 |
|
|
|
538 |
Convert BST to Greater Tree |
100 |
|
|
|
541 |
Reverse String II |
100 |
|
|
|
543 |
Diameter of Binary Tree |
80 |
|
这题易错 |
|
547 |
Friend Circles |
70 |
|
|
|
557 |
Reverse Words in a String III |
100 |
|
|
|
560 |
Subarray Sum Equals K |
70 |
|
|
|
563 |
Binary Tree Tilt |
90 |
|
|
|
564 |
Find the Closest Palindrome |
80 |
|
此题暴力法即可 |
|
572 |
Subtree of Another Tree |
80 |
|
|
|
606 |
Construct String from Binary Tree |
90 |
|
|
|
617 |
Merge Two Binary Trees |
100 |
|
很简单 |
|
621 |
Task Scheduler |
70 |
|
|
|
637 |
Average of Levels in Binary Tree |
100 |
|
|
|
652 |
Find Duplicate Subtrees |
70 |
|
开始还没思路 |
|
653 |
Two Sum IV - Input is a BST |
90 |
|
|
|
654 |
Maximum Binary Tree |
100 |
|
|
|
669 |
Trim a Binary Search Tree |
100 |
|
|
|
681 |
Next Closest Time |
80 |
|
这题多做几遍 |
|
683 |
K Empty Slots |
80 |
|
|
|
684 |
Redundant Connection |
|
|
|
|
687 |
Longest Univalue Path |
70 |
|
|
|
695 |
Max Area of Island |
100 |
|
|
小根堆解法待做 |
703 |
数据流中第K大元素 |
medium |
优先级队列解法/小根堆解法 |
优先级队列解法/小根堆解法 |
|
771 |
Jewels and Stones |
100 |
|
|
|
814 |
Binary Tree Pruning |
80 |
|
|
|
819 |
Most Common Word |
85 |
|
|
|
843 |
Guess the Word |
90 |
|
|
|
844 |
Backspace String Compare |
100 |
|
|
|
849 |
Maximize Distance to Closest Person |
80 |
|
|
|
857 |
Minimum Cost to Hire K Workers |
70 |
|
|
|
871 |
最低加油次数 |
80 |
|
|
|
872 |
Leaf-Similar Trees |
80 |
|
|
|
889 |
Construct Binary Tree from Preorder and Postorder Traversal |
80 |
|
|
|
904 |
Fruit Into Baskets |
90 |
|
|
|
929 |
Unique Email Addresses |
90 |
|