• 介绍
  • Leetcode 分类顺序表
    • Array
    • String
    • Math
    • Tree
    • Backtracking
    • Dynamic Programming
    • LinkedList
    • Binary Search
    • Matrix
    • DFS & BFS
    • Stack & PriorityQueue
    • Bit Manipulation
    • Topological Sort
    • Random
    • Graph
    • Union Find
    • Trie
    • Design
  • Leetcode 重点250题
    • 划分说明
    • 重点250题
  • Data Science Leetcode精简版
    • 划分说明
    • 精简题目
  • 刷题常见问题
    • 分类顺序表400题够吗
    • 我想提问题
  • 关于作者
  • 参考网站
致所有使用者
Cspiration 独家出品
此表以先易后难 + 分类而成。Leetcode(https://leetcode.com/)本身并没有顺序, 并且类别分的并不是非常好,因为大量非最优解也涵盖在各种类别中。 所以我们依据做题经验,最优解的类别,难度,重新划分。 如果是第一次刷题的小伙伴,最好以本书的顺序为主,可以为大家节省时间,更有效率的做题,减少很多刷题的负担。
注:本表非最终版本。《题型技巧总结》课程中有最终Leetcode分类顺序表版本,更细致,每种题目对应方法一并写出, 并且同类型做题方法归纳一起。 源网站链接 https://www.cspiration.com/
Array
题号 题目链接 讲解链接 说明
基础
27 Remove Element 视频讲解
26 Remove Duplicates from Sorted Array 视频讲解
80 Remove Duplicates from Sorted Array II 视频讲解
277 🔒 Find the Celebrity 视频讲解
189 Rotate Array 视频讲解
41 First Missing Positive 视频讲解
299 Bulls and Cows 视频讲解
134 Gas Station 视频讲解
118 Pascal's Triangle 视频讲解 很少考
119 Pascal's Triangle II 视频讲解 很少考
169 Majority Element 视频讲解 很少考
229 Majority Element II 视频讲解 很少考
274 H-Index 视频讲解
275 H-Index II 视频讲解 Binary Search
243 Shortest Word Distance 视频讲解
244 Shortest Word Distance II 视频讲解
245 Shortest Word Distance III 视频讲解
217 Contains Duplicate 视频讲解
219 Contains Duplicate II 视频讲解 很少考
220 Contains Duplicate III 视频讲解 很少考
55 Jump Game 视频讲解
45 Jump Game II 视频讲解
121 Best Time to Buy and Sell Stock 视频讲解
122 Best Time to Buy and Sell Stock II 视频讲解
123 Best Time to Buy and Sell Stock III 视频讲解
188 Best Time to Buy and Sell Stock IV 视频讲解
309 Best Time to Buy and Sell Stock with Cooldown 视频讲解
11 Container With Most Water 视频讲解
42 Trapping Rain Water 视频讲解
334 Increasing Triplet Subsequence 视频讲解
128 Longest Consecutive Sequence 视频讲解
164 Maximum Gap 视频讲解 Bucket
287 Find the Duplicate Number 视频讲解
135 Candy 视频讲解 很少考
330 Patching Array 视频讲解 很少考
提高
4 Median of Two Sorted Arrays 视频讲解 很少考
321 Create Maximum Number 视频讲解 很少考
327 Count of Range Sum 视频讲解
289 Game of Life 视频讲解
Interval
57 Insert Interval 视频讲解
56 Merge Intervals 视频讲解
252 Meeting Rooms 视频讲解
253 Meeting Rooms II 视频讲解
352 Data Stream as Disjoint Intervals 视频讲解 TreeMap
Counter
239 Sliding Window Maximum 视频讲解
295 Find Median from Data Stream 视频讲解
53 Maximum Subarray 视频讲解
325 Maximum Size Subarray Sum Equals k 视频讲解
209 Minimum Size Subarray Sum 视频讲解
238 Product of Array Except Self 视频讲解
152 Maximum Product Subarray 视频讲解
228 Summary Ranges 视频讲解
163 Missing Ranges 视频讲解
Counter
88 Merge Sorted Array 视频讲解
75 Sort Colors 视频讲解
283 Move Zeroes 视频讲解
376 Wiggle Subsequence 视频讲解
280 Wiggle Sort 视频讲解
324 Wiggle Sort II 视频讲解
278 First Bad Version 视频讲解
35 Search Insert Position 视频讲解
33 Search in Rotated Sorted Array 视频讲解
81 Search in Rotated Sorted Array II 视频讲解
153 Find Minimum in Rotated Sorted Array 视频讲解
154 Find Minimum in Rotated Sorted Array II 视频讲解
162 Find Peak Element 视频讲解
374 Guess Number Higher or Lower 视频讲解
34 Find First and Last Position of Element in Sorted Array 视频讲解
349 Intersection of Two Arrays 视频讲解
350 Intersection of Two Arrays II 视频讲解
315 Count of Smaller Numbers After Self 视频讲解
300 Longest Increasing Subsequence 视频讲解
354 Russian Doll Envelopes 视频讲解
String
题号 题目链接 讲解链接 说明
基础
28 Implement strStr() 视频讲解
14 Longest Common Prefix 视频讲解
58 Length of Last Word 视频讲解
387 First Unique Character in a String 视频讲解
383 Ransom Note 视频讲解
344 Reverse String 视频讲解
151 Reverse Words in a String 视频讲解
186 Reverse Words in a String II 视频讲解
345 Reverse Vowels of a String 视频讲解
205 Isomorphic Strings 视频讲解
293 Flip Game 视频讲解
294 Flip Game II 视频讲解
290 Word Pattern 视频讲解
242 Valid Anagram 视频讲解
49 Group Anagrams 视频讲解
249 Group Shifted Strings 视频讲解
87 Scramble String 视频讲解
179 Largest Number 视频讲解 很少考
6 ZigZag Conversion 视频讲解 很少考
161 One Edit Distance 视频讲解
38 Count and Say 视频讲解
358 Rearrange String k Distance Apart 视频讲解
316 Remove Duplicate Letters 视频讲解
271 Encode and Decode Strings 视频讲解
168 Excel Sheet Column Title 视频讲解
171 Excel Sheet Column Number 视频讲解
13 Roman to Integer 视频讲解
12 Integer to Roman 视频讲解
273 Integer to English Words 视频讲解
246 Strobogrammatic Number 视频讲解
247 Strobogrammatic Number II 视频讲解
248 Strobogrammatic Number III 视频讲解 很少考
提高
157 Read N Characters Given Read4 视频讲解
158 Read N Characters Given Read4 II - Call multiple times 视频讲解
68 Text Justification 视频讲解
65 Valid Number 视频讲解
Substring
76 Minimum Window Substring 视频讲解 Sliding Window
30 Substring with Concatenation of All Words 视频讲解 Sliding Window
3 Longest Substring Without Repeating Characters 视频讲解 Sliding Window
340 Longest Substring with At Most K Distinct Characters 视频讲解 Sliding Window
395 Longest Substring with At Least K Repeating Characters 视频讲解 Sliding Window
159 Longest Substring with At Most Two Distinct Characters 视频讲解 Sliding Window
Palindrome
125 Valid Palindrome 视频讲解
266 Palindrome Permutation 视频讲解
5 Longest Palindromic Substring 视频讲解
9 Palindrome Number 视频讲解
214 Shortest Palindrome 视频讲解
336 Palindrome Pairs 视频讲解
131 Palindrome Partitioning 视频讲解
132 Palindrome Partitioning II 视频讲解
267 Palindrome Permutation II 视频讲解
Parentheses
20 Valid Parentheses 视频讲解
22 Generate Parentheses 视频讲解
32 Longest Valid Parentheses 视频讲解
241 Different Ways to Add Parentheses 视频讲解
301 Remove Invalid Parentheses 视频讲解
Subsequence
392 Is Subsequence 视频讲解
115 Distinct Subsequences 视频讲解
187 Repeated DNA Sequences 视频讲解 很少考
Math
题号 题目链接 讲解链接 说明
基础
7 Reverse Integer 视频讲解
165 Compare Version Numbers 视频讲解
66 Plus One 视频讲解
8 String to Integer (atoi) 视频讲解
258 Add Digits 视频讲解
67 Add Binary 视频讲解
43 Multiply Strings 视频讲解
29 Divide Two Integers 视频讲解
69 Sqrt(x) 视频讲解
50 Pow(x, n) 视频讲解
367 Valid Perfect Square 视频讲解
365 Water and Jug Problem 视频讲解
204 Count Primes 视频讲解
Sum
1 Two Sum 视频讲解
167 Two Sum II - Input array is sorted 视频讲解
15 3Sum 视频讲解
16 3Sum Closest 视频讲解 很少考
259 3Sum Smaller 视频讲解 很少考
18 4Sum 视频讲解
很少考
231 Power of Two 视频讲解
326 Power of Three 视频讲解
342 Power of Four 视频讲解
372 Super Pow 视频讲解
233 Number of Digit One 视频讲解
319 Bulb Switcher 视频讲解
292 Nim Game 视频讲解
202 Happy Number 视频讲解
400 Nth Digit 视频讲解
263 Ugly Number 视频讲解
264 Ugly Number II 视频讲解
306 Additive Number 视频讲解
172 Factorial Trailing Zeroes 视频讲解
343 Integer Break 视频讲解
396 Rotate Function 视频讲解
390 Elimination Game 视频讲解
386 Lexicographical Numbers 视频讲解
357 Count Numbers with Unique Digits 视频讲解
360 Sort Transformed Array 视频讲解
397 Integer Replacement 视频讲解
368 Largest Divisible Subset 视频讲解
Tree
题号 题目链接 讲解链接 说明
基础
144 Binary Tree Preorder Traversal 视频讲解
94 Binary Tree Inorder Traversal 视频讲解
145 Binary Tree Postorder Traversal 视频讲解
102 Binary Tree Level Order Traversal 视频讲解
Preorder
100 Same Tree 视频讲解
101 Symmetric Tree 视频讲解
226 Invert Binary Tree 视频讲解 preorder + BFS
257 Binary Tree Paths 视频讲解
112 Path Sum 视频讲解
113 Path Sum II 视频讲解
129 Sum Root to Leaf Numbers 视频讲解
298 Binary Tree Longest Consecutive Sequence 视频讲解
111 Minimum Depth of Binary Tree 视频讲解
Preorder
104 Maximum Depth of Binary Tree 视频讲解
110 Balanced Binary Tree 视频讲解
124 Binary Tree Maximum Path Sum 视频讲解
250 Count Univalue Subtrees 视频讲解
366 Find Leaves of Binary Tree 视频讲解
337 House Robber III 视频讲解 postorder + preorder
BFS
107 Binary Tree Level Order Traversal II 视频讲解
103 Binary Tree Zigzag Level Order Traversal 视频讲解
199 Binary Tree Right Side View 视频讲解 BFS + preorder
BST
98 Validate Binary Search Tree 视频讲解 preorder
235 Lowest Common Ancestor of a Binary Search Tree 视频讲解 preorder
236 Lowest Common Ancestor of a Binary Tree 视频讲解 postorder
108 Convert Sorted Array to Binary Search Tree 视频讲解 binary search
109 Convert Sorted List to Binary Search Tree 视频讲解 binary search
173 Binary Search Tree Iterator 视频讲解 inorder
230 Kth Smallest Element in a BST 视频讲解 inorder
297 Serialize and Deserialize Binary Tree 视频讲解 BFS
285 Inorder Successor in BST 视频讲解 inorder
270 Closest Binary Search Tree Value 视频讲解 preorder
272 Closest Binary Search Tree Value II 视频讲解 inorder
99 Recover Binary Search Tree 视频讲解 inorder
重要程度
156 Binary Tree Upside Down 视频讲解 很少考
114 Flatten Binary Tree to Linked List 视频讲解 很少考
255 Verify Preorder Sequence in Binary Search Tree 视频讲解 很少考
333 Largest BST Subtree 视频讲解 很少考
222 Count Complete Tree Nodes 视频讲解 很少考
105 Construct Binary Tree from Preorder and Inorder Traversal 视频讲解 很少考
106 Construct Binary Tree from Inorder and Postorder Traversal 视频讲解 很少考
116 Populating Next Right Pointers in Each Node 视频讲解 重要
117 Populating Next Right Pointers in Each Node II 视频讲解 重要
314 Binary Tree Vertical Order Traversal 视频讲解 重要
96 Unique Binary Search Trees 视频讲解 重要
95 Unique Binary Search Trees II 视频讲解 很少考
331 Verify Preorder Serialization of a Binary Tree 视频讲解 很少考
Backtracking
题号 题目链接 讲解链接 说明
78 Subsets 视频讲解
90 Subsets II 视频讲解
77 Combinations 视频讲解
39 Combination Sum 视频讲解
40 Combination Sum II 视频讲解
216 Combination Sum III 视频讲解
377 Combination Sum IV 视频讲解 Dynamic Programming
254 Factor Combinations 视频讲解
46 Permutations 视频讲解
47 Permutations II 视频讲解
31 Next Permutation 视频讲解 String
60 Permutation Sequence 视频讲解 String
291 Word Pattern II 视频讲解
17 Letter Combinations of a Phone Number 视频讲解
320 Generalized Abbreviation 视频讲解
93 Restore IP Addresses 视频讲解 很少考
282 Expression Add Operators 视频讲解
140 Word Break II 视频讲解
351 Android Unlock Patterns 视频讲解
Dynamic Programming
题号 题目链接 讲解链接 说明
一维
70 Climbing Stairs 视频讲解
62 Unique Paths 视频讲解
63 Unique Paths II 视频讲解
120 Triangle 视频讲解 很少考
279 Perfect Squares 视频讲解
139 Word Break 视频讲解
375 Guess Number Higher or Lower II 视频讲解
312 Burst Balloons 视频讲解
322 Coin Change 视频讲解
二维
256 Paint House 视频讲解
265 Paint House II 视频讲解
64 Minimum Path Sum 视频讲解
72 Edit Distance 视频讲解
97 Interleaving String 视频讲解
174 Dungeon Game 视频讲解
221 Maximal Square 视频讲解
85 Maximal Rectangle 视频讲解
363 Max Sum of Rectangle No Larger Than K 视频讲解 TreeSet
化简
198 House Robber 视频讲解
213 House Robber II 视频讲解
276 Paint Fence 视频讲解
91 Decode Ways 视频讲解
10 Regular Expression Matching 视频讲解
44 Wildcard Matching 视频讲解
LinkedList
题号 题目链接 讲解链接
基础
206 Reverse Linked List 视频讲解
141 Linked List Cycle 视频讲解
24 Swap Nodes in Pairs 视频讲解
328 Odd Even Linked List 视频讲解
92 Reverse Linked List II 视频讲解
237 Delete Node in a Linked List 视频讲解
19 Remove Nth Node From End of List 视频讲解
83 Remove Duplicates from Sorted List 视频讲解
203 Remove Linked List Elements 视频讲解
82 Remove Duplicates from Sorted List II 视频讲解
369 Plus One Linked List 视频讲解
2 Add Two Numbers 视频讲解
160 Intersection of Two Linked Lists 视频讲解
21 Merge Two Sorted Lists 视频讲解
提高
234 Palindrome Linked List 视频讲解
143 Reorder List 视频讲解
142 Linked List Cycle II 视频讲解
148 Sort List 视频讲解
25 Reverse Nodes in k-Group 视频讲解
61 Rotate List 视频讲解
86 Partition List 视频讲解
23 Merge k Sorted Lists 视频讲解
147 Insertion Sort List 视频讲解
Binary Search
题号 题目链接 讲解链接
278 First Bad Version 视频讲解
35 Search Insert Position 视频讲解
33 Search in Rotated Sorted Array 视频讲解
81 Search in Rotated Sorted Array II 视频讲解
153 Find Minimum in Rotated Sorted Array 视频讲解
154 Find Minimum in Rotated Sorted Array II 视频讲解
162 Find Peak Element 视频讲解
374 Guess Number Higher or Lower 视频讲解
34 Find First and Last Position of Element in Sorted Array 视频讲解
349 Intersection of Two Arrays 视频讲解
350 Intersection of Two Arrays II 视频讲解
315 Count of Smaller Numbers After Self 视频讲解
300 Longest Increasing Subsequence 视频讲解
354 Russian Doll Envelopes 视频讲解
Matrix
题号 题目链接 讲解链接
48 Rotate Image 视频讲解
54 Spiral Matrix 视频讲解
59 Spiral Matrix II 视频讲解
73 Set Matrix Zeroes 视频讲解
311 Sparse Matrix Multiplication 视频讲解
329 Longest Increasing Path in a Matrix 视频讲解
378 Kth Smallest Element in a Sorted Matrix 视频讲解
74 Search a 2D Matrix 视频讲解
240 Search a 2D Matrix II 视频讲解
370 Range Addition 视频讲解
79 Word Search 视频讲解
296 Best Meeting Point 视频讲解
361 Bomb Enemy 视频讲解
317 Shortest Distance from All Buildings 视频讲解
302 Smallest Rectangle Enclosing Black Pixels 视频讲解
36 Valid Sudoku 视频讲解
37 Sudoku Solver 视频讲解
DFS & BFS
题号 题目链接 讲解链接
200 Number of Islands 视频讲解
286 Walls and Gates 视频讲解
130 Surrounded Regions 视频讲解
339 Nested List Weight Sum 视频讲解
364 Nested List Weight Sum II 视频讲解
127 Word Ladder 视频讲解
51 N-Queens 视频讲解
52 N-Queens II 视频讲解
126 Word Ladder II 视频讲解
Stack & PriorityQueue
题号 题目链接 讲解链接 说明
Stack
155 Min Stack 视频讲解
232 Implement Queue using Stacks 视频讲解
225 Implement Stack using Queues 视频讲解
150 Evaluate Reverse Polish Notation 视频讲解
71 Simplify Path 视频讲解
388 Longest Absolute File Path 视频讲解
394 Decode String 视频讲解
224 Basic Calculator 视频讲解
227 Basic Calculator II 视频讲解
385 Mini Parser 视频讲解
84 Largest Rectangle in Histogram 视频讲解
PriorityQueue
215 Kth Largest Element in an Array 视频讲解
347 Top K Frequent Elements 视频讲解
313 Super Ugly Number 视频讲解 很少考
373 Find K Pairs with Smallest Sums 视频讲解 很少考
218 The Skyline Problem 视频讲解
332 Reconstruct Itinerary 视频讲解
341 Flatten Nested List Iterator 视频讲解
Bit Manipulation
题号 题目链接 讲解链接
389 Find the Difference 视频讲解
136 Single Number 视频讲解
318 Maximum Product of Word Lengths 视频讲解
很少考
393 UTF-8 Validation 视频讲解
201 Bitwise AND of Numbers Range 视频讲解
371 Sum of Two Integers emove Element 视频讲解
338 Counting Bits 视频讲解
89 Gray Code 视频讲解
268 Missing Number 视频讲解
191 Number of 1 Bits 视频讲解
190 Reverse Bits 视频讲解
137 Single Number II 视频讲解
260 Single Number III 视频讲解
Topological Sort
题号 题目链接 讲解链接
207 Course Schedule 视频讲解
210 Course Schedule II 视频讲解
269 Alien Dictionary 视频讲解
Random
题号 题目链接 讲解链接
384 Shuffle an Array 视频讲解
398 Random Pick Index 视频讲解
382 Linked List Random Node 视频讲解
380 Insert Delete GetRandom O(1) 视频讲解
381 Insert Delete GetRandom O(1) - Duplicates allowed 视频讲解
138 Copy List with Random Pointer 视频讲解
Graph
题号 题目链接 讲解链接 说明
基础
133 Clone Graph 视频讲解
399 Evaluate Division 视频讲解
310 Minimum Height Trees 视频讲解
图形学
149 Max Points on a Line 视频讲解
335 Self Crossing 视频讲解 很少考
356 Line Reflection 视频讲解 很少考
391 Perfect Rectangle 视频讲解 很少考
223 Rectangle Area 视频讲解 很少考
Union Find
题号 题目链接 讲解链接
261 Graph Valid Tree 视频讲解
323 Number of Connected Components in an Undirected Graph 视频讲解
305 Number of Islands II 视频讲解
Trie
题号 题目链接 讲解链接
211 Add and Search Word - Data structure design 视频讲解
208 Implement Trie (Prefix Tree) 视频讲解
212 Word Search II 视频讲解
Design
题号 题目链接 讲解链接 说明
359 Logger Rate Limiter 视频讲解
346 Moving Average from Data Stream 视频讲解 Sliding Window
362 Design Hit Counter 视频讲解
281 Zigzag Iterator 视频讲解
284 Peeking Iterator 视频讲解
251 Flatten 2D Vector 视频讲解
288 Unique Word Abbreviation 视频讲解
170 Two Sum III - Data structure design 视频讲解
348 Design Tic-Tac-Toe 视频讲解
379 Design Phone Directory 视频讲解
353 Design Snake Game 视频讲解
146 LRU Cache 视频讲解
355 Design Twitter 视频讲解
303 Range Sum Query - Immutable 视频讲解
304 Range Sum Query 2D - Immutable 视频讲解
307 Range Sum Query - Mutable 视频讲解 BIT & ST
308 Range Sum Query 2D - Mutable 视频讲解 BIT & ST
分类顺序表400题,刷这些够吗,剩下的怎么办?

如果能把Leetcode 前400题都刷透,再做做面经题,足以面试各大公司。

或者说,以算法题角度,横扫各大公司。

但在现实生活中,能把400题刷明白的,十中无一。

我想提问题

有问题,可以在这个word里提问,近期我们会集中回答。

提问题链接(点我)

划分说明
此表是针对 Data Science 这个职位,对Leetcode前400题进行精简,划分精简规则如下:
  • 删除DS不常考,面试低频出现题目
  • 删除SDE考,过难题目
  • 删除高级数据结构算法,保留基础简单题目
  • 保留基础练手题目,提高代码能力

所有题目我们尽量保证客观公正,只是按大概率删除,目的是为了减轻DS的刷题负担。

适用人群:Data Science 职位相关人员

划分说明
这个重点题目是把Leetcode前400题进行精简,划分精简规则如下:
  • 删除不常考,面试低频出现题目
  • 删除重复代码题目(例:链表反转206题,代码在234题出现过)
  • 删除过于简单题目(例:100题:Same Tree)
  • 删除题意不同,代码基本相同题目(例:136 & 389,保留一个)

所有题目尽量保证客观公正,只是按大概率删除不常考题目,很多题目面经出现过, 但出现次数属于个位数或者只有一两家出现进行删除。所以如在面试中出现删除题目概不负责,这只是从概率上删除低频,简单题目。 旨在减轻大家的刷题负担,从400题减少到250题。

适用人群:有一定刷题基础,算法基础,二刷人群。

建议:400题全部刷完,再精刷这250题。
Leetcode 前 400 重点 250 题
题号 题目名称 讲解链接
1 Two Sum 视频讲解
3 Longest Substring Without Repeating Characters 视频讲解
4 Median of Two Sorted Arrays 视频讲解
5 Longest Palindromic Substring 视频讲解
7 Reverse Integer 视频讲解
8 String to Integer (atoi) 视频讲解
10 Regular Expression Matching 视频讲解
11 Container With Most Water 视频讲解
12 Integer to Roman 视频讲解
13 Roman to Integer 视频讲解
15 3Sum 视频讲解
17 Letter Combinations of a Phone Number 视频讲解
18 4Sum 视频讲解
20 Valid Parentheses 视频讲解
22 Generate Parentheses 视频讲解
23 Merge k Sorted Lists 视频讲解
26 Remove Duplicates from Sorted Array 视频讲解
27 Remove Element 视频讲解
28 Implement strStr() 视频讲解
29 Divide Two Integers 视频讲解
31 Next Permutation 视频讲解
32 Longest Valid Parentheses 视频讲解
33 Search in Rotated Sorted Array 视频讲解
34 Find First and Last Position of Element in Sorted Array 视频讲解
35 Search Insert Position 视频讲解
36 Valid Sudoku 视频讲解
37 Sudoku Solver 视频讲解
38 Count and Say 视频讲解
39 Combination Sum 视频讲解
40 Combination Sum II 视频讲解
41 First Missing Positive 视频讲解
42 Trapping Rain Water 视频讲解
43 Multiply Strings 视频讲解
44 Wildcard Matching 视频讲解
45 Jump Game II 视频讲解
46 Permutations 视频讲解
47 Permutations II 视频讲解
48 Rotate Image 视频讲解
49 Group Anagrams 视频讲解
50 Pow(x, n) 视频讲解
51 N-Queens 视频讲解
52 N-Queens II 视频讲解
53 Maximum Subarray 视频讲解
54 Spiral Matrix 视频讲解
55 Jump Game 视频讲解
56 Merge Intervals 视频讲解
57 Insert Interval 视频讲解
59 Spiral Matrix II 视频讲解
60 Permutation Sequence 视频讲解
62 Unique Paths 视频讲解
64 Minimum Path Sum 视频讲解
65 Valid Number 视频讲解
66 Plus One 视频讲解
67 Add Binary 视频讲解
68 Text Justification 视频讲解
69 Sqrt(x) 视频讲解
70 Climbing Stairs 视频讲解
71 Simplify Path 视频讲解
72 Edit Distance 视频讲解
74 Search a 2D Matrix 视频讲解
75 Sort Colors 视频讲解
76 Minimum Window Substring 视频讲解
77 Combinations 视频讲解
78 Subsets 视频讲解
79 Word Search 视频讲解
80 Remove Duplicates from Sorted Array II 视频讲解
81 Search in Rotated Sorted Array II 视频讲解
82 Remove Duplicates from Sorted List II 视频讲解
84 Largest Rectangle in Histogram 视频讲解
85 Maximal Rectangle 视频讲解
88 Merge Sorted Array 视频讲解
90 Subsets II 视频讲解
91 Decode Ways 视频讲解
96 Unique Binary Search Trees 视频讲解
98 Validate Binary Search Tree 视频讲解
101 Symmetric Tree 视频讲解
104 Maximum Depth of Binary Tree 视频讲解
108 Convert Sorted Array to Binary Search Tree 视频讲解
110 Balanced Binary Tree 视频讲解
111 Minimum Depth of Binary Tree 视频讲解
112 Path Sum 视频讲解
113 Path Sum II 视频讲解
115 Distinct Subsequences 视频讲解
116 Populating Next Right Pointers in Each Node 视频讲解
117 Populating Next Right Pointers in Each Node II 视频讲解
121 Best Time to Buy and Sell Stock 视频讲解
122 Best Time to Buy and Sell Stock II 视频讲解
123 Best Time to Buy and Sell Stock III 视频讲解
124 Binary Tree Maximum Path Sum 视频讲解
125 Valid Palindrome 视频讲解
126 Word Ladder II 视频讲解
127 Word Ladder 视频讲解
128 Longest Consecutive Sequence 视频讲解
130 Surrounded Regions 视频讲解
133 Clone Graph 视频讲解
134 Gas Station 视频讲解
138 Copy List with Random Pointer 视频讲解
139 Word Break 视频讲解
140 Word Break II 视频讲解
142 Linked List Cycle II 视频讲解
146 LRU Cache 视频讲解
149 Max Points on a Line 视频讲解
150 Evaluate Reverse Polish Notation 视频讲解
152 Maximum Product Subarray 视频讲解
153 Find Minimum in Rotated Sorted Array 视频讲解
154 Find Minimum in Rotated Sorted Array II 视频讲解
155 Min Stack 视频讲解
157 Read N Characters Given Read4 视频讲解
158 Read N Characters Given Read4 II - Call multiple times 视频讲解
161 One Edit Distance 视频讲解
162 Find Peak Element 视频讲解
163 Missing Ranges 视频讲解
168 Excel Sheet Column Title 视频讲解
171 Excel Sheet Column Number 视频讲解
173 Binary Search Tree Iterator 视频讲解
174 Dungeon Game 视频讲解
186 Reverse Words in a String II 视频讲解
188 Best Time to Buy and Sell Stock IV 视频讲解
189 Rotate Array 视频讲解
191 Number of 1 Bits 视频讲解
198 House Robber 视频讲解
200 Number of Islands 视频讲解
201 Bitwise AND of Numbers Range 视频讲解
202 Happy Number 视频讲解
204 Count Primes 视频讲解
205 Isomorphic Strings 视频讲解
207 Course Schedule 视频讲解
208 Implement Trie (Prefix Tree) 视频讲解
209 Minimum Size Subarray Sum 视频讲解
210 Course Schedule II 视频讲解
211 Add and Search Word - Data structure design 视频讲解
212 Word Search II 视频讲解
213 House Robber II 视频讲解
214 Shortest Palindrome 视频讲解
215 Kth Largest Element in an Array 视频讲解
216 Combination Sum III 视频讲解
217 Contains Duplicate 视频讲解
218 The Skyline Problem 视频讲解
219 Contains Duplicate II 视频讲解
220 Contains Duplicate III 视频讲解
221 Maximal Square 视频讲解
224 Basic Calculator 视频讲解
225 Implement Stack using Queues 视频讲解
226 Invert Binary Tree 视频讲解
227 Basic Calculator II 视频讲解
228 Summary Ranges 视频讲解
230 Kth Smallest Element in a BST 视频讲解
231 Power of Two 视频讲解
232 Implement Queue using Stacks 视频讲解
235 Lowest Common Ancestor of a Binary Search Tree 视频讲解
236 Lowest Common Ancestor of a Binary Tree 视频讲解
238 Product of Array Except Self 视频讲解
239 Sliding Window Maximum 视频讲解
240 Search a 2D Matrix II 视频讲解
241 Different Ways to Add Parentheses 视频讲解
242 Valid Anagram 视频讲解
244 Shortest Word Distance II 视频讲解
245 Shortest Word Distance III 视频讲解
249 Group Shifted Strings 视频讲解
251 Flatten 2D Vector 视频讲解
252 Meeting Rooms 视频讲解
253 Meeting Rooms II 视频讲解
254 Factor Combinations 视频讲解
256 Paint House 视频讲解
257 Binary Tree Paths 视频讲解
261 Graph Valid Tree 视频讲解
263 Ugly Number 视频讲解
264 Ugly Number II 视频讲解
265 Paint House II 视频讲解
268 Missing Number 视频讲解
269 Alien Dictionary 视频讲解
270 Closest Binary Search Tree Value 视频讲解
271 Encode and Decode Strings 视频讲解
273 Integer to English Words 视频讲解
274 H-Index 视频讲解
275 H-Index II 视频讲解
276 Paint Fence 视频讲解
277 Find the Celebrity 视频讲解
278 First Bad Version 视频讲解
279 Perfect Squares 视频讲解
280 Wiggle Sort 视频讲解
282 Expression Add Operators 视频讲解
283 Move Zeroes 视频讲解
284 Peeking Iterator 视频讲解
285 Inorder Successor in BST 视频讲解
286 Walls and Gates 视频讲解
287 Find the Duplicate Number 视频讲解
288 Unique Word Abbreviation 视频讲解
289 Game of Life 视频讲解
290 Word Pattern 视频讲解
291 Word Pattern II 视频讲解
293 Flip Game 视频讲解
294 Flip Game II 视频讲解
295 Find Median from Data Stream 视频讲解
296 Best Meeting Point 视频讲解
297 Serialize and Deserialize Binary Tree 视频讲解
298 Binary Tree Longest Consecutive Sequence 视频讲解
299 Bulls and Cows 视频讲解
300 Longest Increasing Subsequence 视频讲解
301 Remove Invalid Parentheses 视频讲解
302 Smallest Rectangle Enclosing Black Pixels 视频讲解
305 Number of Islands II 视频讲解
307 Range Sum Query - Mutable 视频讲解
308 Range Sum Query 2D - Mutable 视频讲解
309 Best Time to Buy and Sell Stock with Cooldown 视频讲解
311 Sparse Matrix Multiplication 视频讲解
312 Burst Balloons 视频讲解
314 Binary Tree Vertical Order Traversal 视频讲解
316 Remove Duplicate Letters 视频讲解
317 Shortest Distance from All Buildings 视频讲解
318 Maximum Product of Word Lengths 视频讲解
322 Coin Change 视频讲解
323 Number of Connected Components in an Undirected Graph 视频讲解
324 Wiggle Sort II 视频讲解
325 Maximum Size Subarray Sum Equals k 视频讲解
329 Longest Increasing Path in a Matrix 视频讲解
334 Increasing Triplet Subsequence 视频讲解
336 Palindrome Pairs 视频讲解
337 House Robber III 视频讲解
338 Counting Bits 视频讲解
339 Nested List Weight Sum 视频讲解
340 Longest Substring with At Most K Distinct Characters 视频讲解
341 Flatten Nested List Iterator 视频讲解
346 Moving Average from Data Stream 视频讲解
347 Top K Frequent Elements 视频讲解
348 Design Tic-Tac-Toe 视频讲解
350 Intersection of Two Arrays II 视频讲解
351 Android Unlock Patterns 视频讲解
352 Data Stream as Disjoint Intervals 视频讲解
353 Design Snake Game 视频讲解
354 Russian Doll Envelopes 视频讲解
355 Design Twitter 视频讲解
359 Logger Rate Limiter 视频讲解
361 Bomb Enemy 视频讲解
362 Design Hit Counter 视频讲解
364 Nested List Weight Sum II 视频讲解
367 Valid Perfect Square 视频讲解
374 Guess Number Higher or Lower 视频讲解
375 Guess Number Higher or Lower II 视频讲解
376 Wiggle Subsequence 视频讲解
377 Combination Sum IV 视频讲解
378 Kth Smallest Element in a Sorted Matrix 视频讲解
379 Design Phone Directory 视频讲解
380 Insert Delete GetRandom O(1) 视频讲解
381 Insert Delete GetRandom O(1) - Duplicates allowed 视频讲解
384 Shuffle an Array 视频讲解
385 Mini Parser 视频讲解
389 Find the Difference 视频讲解
394 Decode String 视频讲解
398 Random Pick Index 视频讲解
Data Science Leetcode 精简版
题号 题目名称 讲解链接
1 Two Sum 视频讲解
2 Add Two Numbers 视频讲解
3 Longest Substring Without Repeating Characters 视频讲解
5 Longest Palindromic Substring 视频讲解
7 Reverse Integer 视频讲解
8 String to Integer (atoi) 视频讲解
9 Palindrome Number 视频讲解
11 Container With Most Water 视频讲解
14 Longest Common Prefix 视频讲解
15 3Sum 视频讲解
16 3Sum Closest 视频讲解
17 Letter Combinations of a Phone Number 视频讲解
18 4Sum 视频讲解
19 Remove Nth Node From End of List 视频讲解
20 Valid Parentheses 视频讲解
21 Merge Two Sorted Lists 视频讲解
22 Generate Parentheses 视频讲解
24 Swap Nodes in Pairs 视频讲解
25 Reverse Nodes in k-Group 视频讲解
26 Remove Duplicates from Sorted Array 视频讲解
27 Remove Element 视频讲解
28 Implement strStr() 视频讲解
29 Divide Two Integers 视频讲解
30 Substring with Concatenation of All Words 视频讲解
32 Longest Valid Parentheses 视频讲解
33 Search in Rotated Sorted Array 视频讲解
35 Search Insert Position 视频讲解
36 Valid Sudoku 视频讲解
39 Combination Sum 视频讲解
40 Combination Sum II 视频讲解
41 First Missing Positive 视频讲解
42 Trapping Rain Water 视频讲解
45 Jump Game II 视频讲解
46 Permutations 视频讲解
47 Permutations II 视频讲解
49 Group Anagrams 视频讲解
50 Pow(x, n) 视频讲解
53 Maximum Subarray 视频讲解
55 Jump Game 视频讲解
56 Merge Intervals 视频讲解
57 Insert Interval 视频讲解
58 Length of Last Word 视频讲解
60 Permutation Sequence 视频讲解
61 Rotate List 视频讲解
62 Unique Paths 视频讲解
63 Unique Paths II 视频讲解
64 Minimum Path Sum 视频讲解
66 Plus One 视频讲解
69 Sqrt(x) 视频讲解
70 Climbing Stairs 视频讲解
71 Simplify Path 视频讲解
74 Search a 2D Matrix 视频讲解
75 Sort Colors 视频讲解
76 Minimum Window Substring 视频讲解
77 Combinations 视频讲解
78 Subsets 视频讲解
79 Word Search 视频讲解
80 Remove Duplicates from Sorted Array II 视频讲解
82 Remove Duplicates from Sorted List II 视频讲解
83 Remove Duplicates from Sorted List 视频讲解
86 Partition List 视频讲解
87 Scramble String 视频讲解
88 Merge Sorted Array 视频讲解
90 Subsets II 视频讲解
92 Reverse Linked List II 视频讲解
94 Binary Tree Inorder Traversal 视频讲解
98 Validate Binary Search Tree 视频讲解
99 Recover Binary Search Tree 视频讲解
100 Same Tree 视频讲解
101 Symmetric Tree 视频讲解
102 Binary Tree Level Order Traversal 视频讲解
103 Binary Tree Zigzag Level Order Traversal 视频讲解
104 Maximum Depth of Binary Tree 视频讲解
107 Binary Tree Level Order Traversal II 视频讲解
110 Balanced Binary Tree 视频讲解
111 Minimum Depth of Binary Tree 视频讲解
112 Path Sum 视频讲解
113 Path Sum II 视频讲解
121 Best Time to Buy and Sell Stock 视频讲解
122 Best Time to Buy and Sell Stock II 视频讲解
124 Binary Tree Maximum Path Sum 视频讲解
125 Valid Palindrome 视频讲解
127 Word Ladder 视频讲解
129 Sum Root to Leaf Numbers 视频讲解
131 Palindrome Partitioning 视频讲解
136 Single Number 视频讲解
138 Copy List with Random Pointer 视频讲解
139 Word Break 视频讲解
141 Linked List Cycle 视频讲解
142 Linked List Cycle II 视频讲解
143 Reorder List 视频讲解
144 Binary Tree Preorder Traversal 视频讲解
145 Binary Tree Postorder Traversal 视频讲解
148 Sort List 视频讲解
150 Evaluate Reverse Polish Notation 视频讲解
151 Reverse Words in a String 视频讲解
153 Find Minimum in Rotated Sorted Array 视频讲解
154 Find Minimum in Rotated Sorted Array II 视频讲解
155 Min Stack 视频讲解
156 Binary Tree Upside Down 视频讲解
160 Intersection of Two Linked Lists 视频讲解
161 One Edit Distance 视频讲解
162 Find Peak Element 视频讲解
163 Missing Ranges 视频讲解
165 Compare Version Numbers 视频讲解
167 Two Sum II - Input array is sorted 视频讲解
168 Excel Sheet Column Title 视频讲解
169 Majority Element 视频讲解
170 Two Sum III - Data structure design 视频讲解
171 Excel Sheet Column Number 视频讲解
173 Binary Search Tree Iterator 视频讲解
186 Reverse Words in a String II 视频讲解
187 Repeated DNA Sequences 视频讲解
198 House Robber 视频讲解
199 Binary Tree Right Side View 视频讲解
200 Number of Islands 视频讲解
202 Happy Number 视频讲解
203 Remove Linked List Elements 视频讲解
205 Isomorphic Strings 视频讲解
206 Reverse Linked List 视频讲解
209 Minimum Size Subarray Sum 视频讲解
213 House Robber II 视频讲解
214 Shortest Palindrome 视频讲解
215 Kth Largest Element in an Array 视频讲解
216 Combination Sum III 视频讲解
217 Contains Duplicate 视频讲解
219 Contains Duplicate II 视频讲解
220 Contains Duplicate III 视频讲解
221 Maximal Square 视频讲解
224 Basic Calculator 视频讲解
225 Implement Stack using Queues 视频讲解
226 Invert Binary Tree 视频讲解
227 Basic Calculator II 视频讲解
228 Summary Ranges 视频讲解
229 Majority Element II 视频讲解
230 Kth Smallest Element in a BST 视频讲解
232 Implement Queue using Stacks 视频讲解
234 Palindrome Linked List 视频讲解
235 Lowest Common Ancestor of a Binary Search Tree 视频讲解
236 Lowest Common Ancestor of a Binary Tree 视频讲解
237 Delete Node in a Linked List 视频讲解
238 Product of Array Except Self 视频讲解
239 Sliding Window Maximum 视频讲解
240 Search a 2D Matrix II 视频讲解
242 Valid Anagram 视频讲解
243 Shortest Word Distance 视频讲解
244 Shortest Word Distance II 视频讲解
245 Shortest Word Distance III 视频讲解
246 Strobogrammatic Number 视频讲解
247 Strobogrammatic Number II 视频讲解
250 Count Univalue Subtrees 视频讲解
251 Flatten 2D Vector 视频讲解
252 Meeting Rooms 视频讲解
253 Meeting Rooms II 视频讲解
254 Factor Combinations 视频讲解
255 Verify Preorder Sequence in Binary Search Tree 视频讲解
256 Paint House 视频讲解
257 Binary Tree Paths 视频讲解
258 Add Digits 视频讲解
259 3Sum Smaller 视频讲解
263 Ugly Number 视频讲解
264 Ugly Number II 视频讲解
266 Palindrome Permutation 视频讲解
267 Palindrome Permutation II 视频讲解
268 Missing Number 视频讲解
270 Closest Binary Search Tree Value 视频讲解
274 H-Index 视频讲解
275 H-Index II 视频讲解
277 Find the Celebrity 视频讲解
278 First Bad Version 视频讲解
279 Perfect Squares 视频讲解
280 Wiggle Sort 视频讲解
283 Move Zeroes 视频讲解
285 Inorder Successor in BST 视频讲解
286 Walls and Gates 视频讲解
287 Find the Duplicate Number 视频讲解
288 Unique Word Abbreviation 视频讲解
290 Word Pattern 视频讲解
295 Find Median from Data Stream 视频讲解
296 Best Meeting Point 视频讲解
298 Binary Tree Longest Consecutive Sequence 视频讲解
299 Bulls and Cows 视频讲解
300 Longest Increasing Subsequence 视频讲解
303 Range Sum Query - Immutable 视频讲解
304 Range Sum Query 2D - Immutable 视频讲解
305 Number of Islands II 视频讲解
311 Sparse Matrix Multiplication 视频讲解
313 Super Ugly Number 视频讲解
316 Remove Duplicate Letters 视频讲解
320 Generalized Abbreviation 视频讲解
322 Coin Change 视频讲解
325 Maximum Size Subarray Sum Equals k 视频讲解
326 Power of Three 视频讲解
328 Odd Even Linked List 视频讲解
330 Patching Array 视频讲解
334 Increasing Triplet Subsequence 视频讲解
337 House Robber III 视频讲解
339 Nested List Weight Sum 视频讲解
340 Longest Substring with At Most K Distinct Characters 视频讲解
341 Flatten Nested List Iterator 视频讲解
342 Power of Four 视频讲解
344 Reverse String 视频讲解
345 Reverse Vowels of a String 视频讲解
346 Moving Average from Data Stream 视频讲解
347 Top K Frequent Elements 视频讲解
349 Intersection of Two Arrays 视频讲解
350 Intersection of Two Arrays II 视频讲解
356 Line Reflection 视频讲解
359 Logger Rate Limiter 视频讲解
360 Sort Transformed Array 视频讲解
362 Design Hit Counter 视频讲解
365 Water and Jug Problem 视频讲解
366 Find Leaves of Binary Tree 视频讲解
367 Valid Perfect Square 视频讲解
369 Plus One Linked List 视频讲解
370 Range Addition 视频讲解
373 Find K Pairs with Smallest Sums 视频讲解
374 Guess Number Higher or Lower 视频讲解
376 Wiggle Subsequence 视频讲解
377 Combination Sum IV 视频讲解
378 Kth Smallest Element in a Sorted Matrix 视频讲解
379 Design Phone Directory 视频讲解
380 Insert Delete GetRandom O(1) 视频讲解
381 Insert Delete GetRandom O(1) - Duplicates allowed 视频讲解
383 Ransom Note 视频讲解
387 First Unique Character in a String 视频讲解
388 Longest Absolute File Path 视频讲解
389 Find the Difference 视频讲解
392 Is Subsequence 视频讲解
400 Nth Digit 视频讲解
Edward Shi

留学两年多,刷题过三千。

CS科班出身,但非ACMer,从没接触过ACM。从树的遍历捡起算法,纯自己刷题。

在北美留学期间刷了3000多道题,全部都是Leetcode和面试题。自我总结出公司面试题出题方式,套路。

独立做出针对面试刷题的课程,课程如下:

《算法基础知识(上下)》

《题型技巧总结(上下)》

《Leetcode 题目视频讲解(上中下1-900题)》

LeetCode
​https://leetcode.com