File tree
358 files changed
+875
-1757
lines changed- .github/workflows
- basic/sorting
- HeapSort
- MergeSort
- QuickSort
- lcci
- 01.03.String to URL
- 02.05.Sum Lists
- 03.02.Min Stack
- 03.04.Implement Queue using Stacks
- 03.05.Sort of Stacks
- 03.06.Animal Shelter
- 04.02.Minimum Height Tree
- 04.03.List of Depth
- 04.05.Legal Binary Search Tree
- 04.10.Check SubTree
- 04.12.Paths with Sum
- 08.02.Robot in a Grid
- 10.02.Group Anagrams
- 16.02.Words Frequency
- 16.25.LRU Cache
- lcof
- 面试题07. 重建二叉树
- 面试题09. 用两个栈实现队列
- 面试题12. 矩阵中的路径
- 面试题25. 合并两个排序的链表
- 面试题26. 树的子结构
- 面试题27. 二叉树的镜像
- 面试题29. 顺时针打印矩阵
- 面试题30. 包含min函数的栈
- 面试题32 - I. 从上到下打印二叉树
- 面试题32 - II. 从上到下打印二叉树 II
- 面试题32 - III. 从上到下打印二叉树 III
- 面试题33. 二叉搜索树的后序遍历序列
- 面试题34. 二叉树中和为某一值的路径
- 面试题41. 数据流中的中位数
- 面试题45. 把数组排成最小的数
- 面试题54. 二叉搜索树的第k大节点
- 面试题55 - I. 二叉树的深度
- 面试题55 - II. 平衡二叉树
- 面试题59 - II. 队列的最大值
- 面试题64. 求1+2+…+n
- 面试题68 - I. 二叉搜索树的最近公共祖先
- 面试题68 - II. 二叉树的最近公共祖先
- lcof2
- 剑指 Offer II 031. 最近最少使用缓存
- 剑指 Offer II 038. 每日温度
- 剑指 Offer II 051. 节点之和最大的路径
- 剑指 Offer II 052. 展平二叉搜索树
- 剑指 Offer II 054. 所有大于等于节点的值之和
- 剑指 Offer II 055. 二叉搜索树迭代器
- lcp/LCP 06. 拿硬币
- solution
- 0000-0099
- 0002.Add Two Numbers
- 0003.Longest Substring Without Repeating Characters
- 0007.Reverse Integer
- 0010.Regular Expression Matching
- 0012.Integer to Roman
- 0013.Roman to Integer
- 0014.Longest Common Prefix
- 0021.Merge Two Sorted Lists
- 0032.Longest Valid Parentheses
- 0041.First Missing Positive
- 0049.Group Anagrams
- 0065.Valid Number
- 0079.Word Search
- 0092.Reverse Linked List II
- 0094.Binary Tree Inorder Traversal
- 0095.Unique Binary Search Trees II
- 0097.Interleaving String
- 0098.Validate Binary Search Tree
- 0100-0199
- 0100.Same Tree
- 0101.Symmetric Tree
- 0102.Binary Tree Level Order Traversal
- 0103.Binary Tree Zigzag Level Order Traversal
- 0104.Maximum Depth of Binary Tree
- 0105.Construct Binary Tree from Preorder and Inorder Traversal
- 0106.Construct Binary Tree from Inorder and Postorder Traversal
- 0107.Binary Tree Level Order Traversal II
- 0108.Convert Sorted Array to Binary Search Tree
- 0109.Convert Sorted List to Binary Search Tree
- 0110.Balanced Binary Tree
- 0111.Minimum Depth of Binary Tree
- 0112.Path Sum
- 0113.Path Sum II
- 0114.Flatten Binary Tree to Linked List
- 0124.Binary Tree Maximum Path Sum
- 0129.Sum Root to Leaf Numbers
- 0130.Surrounded Regions
- 0136.Single Number
- 0137.Single Number II
- 0143.Reorder List
- 0144.Binary Tree Preorder Traversal
- 0145.Binary Tree Postorder Traversal
- 0146.LRU Cache
- 0155.Min Stack
- 0173.Binary Search Tree Iterator
- 0199.Binary Tree Right Side View
- 0200-0299
- 0200.Number of Islands
- 0208.Implement Trie (Prefix Tree)
- 0216.Combination Sum III
- 0222.Count Complete Tree Nodes
- 0226.Invert Binary Tree
- 0230.Kth Smallest Element in a BST
- 0232.Implement Queue using Stacks
- 0236.Lowest Common Ancestor of a Binary Tree
- 0252.Meeting Rooms
- 0253.Meeting Rooms II
- 0258.Add Digits
- 0274.H-Index
- 0287.Find the Duplicate Number
- 0295.Find Median from Data Stream
- 0296.Best Meeting Point
- 0300-0399
- 0303.Range Sum Query - Immutable
- 0304.Range Sum Query 2D - Immutable
- 0341.Flatten Nested List Iterator
- 0362.Design Hit Counter
- 0380.Insert Delete GetRandom O(1)
- 0384.Shuffle an Array
- 0389.Find the Difference
- 0396.Rotate Function
- 0399.Evaluate Division
- 0400-0499
- 0403.Frog Jump
- 0404.Sum of Left Leaves
- 0433.Minimum Genetic Mutation
- 0445.Add Two Numbers II
- 0450.Delete Node in a BST
- 0454.4Sum II
- 0460.LFU Cache
- 0481.Magical String
- 0486.Predict the Winner
- 0500-0599
- 0508.Most Frequent Subtree Sum
- 0513.Find Bottom Left Tree Value
- 0515.Find Largest Value in Each Tree Row
- 0528.Random Pick with Weight
- 0530.Minimum Absolute Difference in BST
- 0542.01 Matrix
- 0543.Diameter of Binary Tree
- 0572.Subtree of Another Tree
- 0591.Tag Validator
- 0599.Minimum Index Sum of Two Lists
- 0600-0699
- 0617.Merge Two Binary Trees
- 0622.Design Circular Queue
- 0637.Average of Levels in Binary Tree
- 0645.Set Mismatch
- 0652.Find Duplicate Subtrees
- 0653.Two Sum IV - Input is a BST
- 0654.Maximum Binary Tree
- 0655.Print Binary Tree
- 0669.Trim a Binary Search Tree
- 0675.Cut Off Trees for Golf Event
- 0676.Implement Magic Dictionary
- 0687.Longest Univalue Path
- 0691.Stickers to Spell Word
- 0700-0799
- 0707.Design Linked List
- 0713.Subarray Product Less Than K
- 0728.Self Dividing Numbers
- 0729.My Calendar I
- 0767.Reorganize String
- 0778.Swim in Rising Water
- 0785.Is Graph Bipartite
- 0791.Custom Sort String
- 0800-0899
- 0804.Unique Morse Code Words
- 0814.Binary Tree Pruning
- 0819.Most Common Word
- 0827.Making A Large Island
- 0872.Leaf-Similar Trees
- 0883.Projection Area of 3D Shapes
- 0894.All Possible Full Binary Trees
- 0900-0999
- 0901.Online Stock Span
- 0907.Sum of Subarray Minimums
- 0933.Number of Recent Calls
- 0936.Stamping The Sequence
- 0937.Reorder Data in Log Files
- 0940.Distinct Subsequences II
- 0942.DI String Match
- 0953.Verifying an Alien Dictionary
- 0965.Univalued Binary Tree
- 0973.K Closest Points to Origin
- 0986.Interval List Intersections
- 0994.Rotting Oranges
- 0998.Maximum Binary Tree II
- 1000-1099
- 1008.Construct Binary Search Tree from Preorder Traversal
- 1022.Sum of Root To Leaf Binary Numbers
- 1036.Escape a Large Maze
- 1038.Binary Search Tree to Greater Sum Tree
- 1048.Longest String Chain
- 1049.Last Stone Weight II
- 1094.Car Pooling
- 1100-1199
- 1102.Path With Maximum Minimum Value
- 1106.Parsing A Boolean Expression
- 1197.Minimum Knight Moves
- 1199.Minimum Time to Build Blocks
- 1200-1299
- 1229.Meeting Scheduler
- 1244.Design A Leaderboard
- 1282.Group the People Given the Group Size They Belong To
- 1300-1399
- 1302.Deepest Leaves Sum
- 1305.All Elements in Two Binary Search Trees
- 1326.Minimum Number of Taps to Open to Water a Garden
- 1367.Linked List in Binary Tree
- 1385.Find the Distance Value Between Two Arrays
- 1400-1499
- 1431.Kids With the Greatest Number of Candies
- 1436.Destination City
- 1457.Pseudo-Palindromic Paths in a Binary Tree
- 1458.Max Dot Product of Two Subsequences
- 1465.Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts
- 1500-1599/1599.Maximum Profit of Operating a Centennial Wheel
- 1600-1699
- 1603.Design Parking System
- 1647.Minimum Deletions to Make Character Frequencies Unique
- 1656.Design an Ordered Stream
- 1668.Maximum Repeating Substring
- 1672.Richest Customer Wealth
- 1678.Goal Parser Interpretation
- 1694.Reformat Phone Number
- 1697.Checking Existence of Edge Length Limited Paths
- 1700-1799
- 1702.Maximum Binary String After Change
- 1769.Minimum Number of Operations to Move All Balls to Each Box
- 1773.Count Items Matching a Rule
- 1797.Design Authentication Manager
- 1800-1899
- 1862.Sum of Floored Pairs
- 1894.Find the Student that Will Replace the Chalk
- 1900-1999
- 1920.Build Array from Permutation
- 1971.Find if Path Exists in Graph
- 2000-2099
- 2003.Smallest Missing Genetic Value in Each Subtree
- 2032.Two Out of Three
- 2043.Simple Bank System
- 2100-2199
- 2103.Rings and Rods
- 2125.Number of Laser Beams in a Bank
- 2132.Stamping the Grid
- 2134.Minimum Swaps to Group All 1's Together II
- 2141.Maximum Running Time of N Computers
- 2185.Counting Words With a Given Prefix
- 2196.Create Binary Tree From Descriptions
- 2200-2299
- 2212.Maximum Points in an Archery Competition
- 2215.Find the Difference of Two Arrays
- 2217.Find Palindrome With Fixed Length
- 2236.Root Equals Sum of Children
- 2251.Number of Flowers in Full Bloom
- 2293.Min Max Game
- 2300-2399
- 2331.Evaluate Boolean Binary Tree
- 2336.Smallest Number in Infinite Set
- 2383.Minimum Hours of Training to Win a Competition
- 2400-2499
- 2415.Reverse Odd Levels of Binary Tree
- 2418.Sort the People
- 2443.Sum of Number and Its Reverse
- 2448.Minimum Cost to Make Array Equal
- 2451.Odd String Difference
- 2452.Words Within Two Edits of Dictionary
- 2455.Average Value of Even Numbers That Are Divisible by Three
- 2471.Minimum Number of Operations to Sort a Binary Tree by Level
- 2500-2599
- 2511.Maximum Enemy Forts That Can Be Captured
- 2512.Reward Top K Students
- 2515.Shortest Distance to Target String in a Circular Array
- 2520.Count the Digits That Divide a Number
- 2525.Categorize Box According to Criteria
- 2535.Difference Between Element Sum and Digit Sum of an Array
- 2541.Minimum Operations to Make Array Equal II
- 2553.Separate the Digits in an Array
- 2566.Maximum Difference by Remapping a Digit
- 2567.Minimum Score by Changing Two Elements
- 2586.Count the Number of Vowel Strings in Range
- 2590.Design a Todo List
- 2600-2699
- 2600.K Items With the Maximum Sum
- 2643.Row With Maximum Ones
- 2652.Sum Multiples
- 2664.The Knight’s Tour
- 2671.Frequency Tracker
- 2679.Sum in a Matrix
- 2700-2799
- 2742.Painting the Walls
- 2798.Number of Employees Who Met the Target
- 2800-2899
- 2812.Find the Safest Path in a Grid
- 2828.Check if a String Is an Acronym of Words
- 2864.Maximum Odd Binary Number
- 2900-2999
- 2900.Longest Unequal Adjacent Groups Subsequence I
- 2901.Longest Unequal Adjacent Groups Subsequence II
- 2904.Shortest and Lexicographically Smallest Beautiful String
- 2974.Minimum Number Game
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
358 files changed
+875
-1757
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
| 32 | + | |
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
|
+1-1
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
207 | 207 |
| |
208 | 208 |
| |
209 | 209 |
| |
210 |
| - | |
211 |
| - | |
212 |
| - | |
213 |
| - | |
| 210 | + | |
214 | 211 |
| |
215 | 212 |
| |
216 | 213 |
| |
217 | 214 |
| |
218 | 215 |
| |
219 |
| - | |
220 |
| - | |
221 |
| - | |
222 |
| - | |
| 216 | + | |
223 | 217 |
| |
224 | 218 |
| |
225 | 219 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 |
| - | |
| 40 | + | |
44 | 41 |
| |
45 | 42 |
| |
46 | 43 |
| |
47 | 44 |
| |
48 | 45 |
| |
49 |
| - | |
50 |
| - | |
51 |
| - | |
52 |
| - | |
| 46 | + | |
53 | 47 |
| |
54 | 48 |
| |
55 | 49 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 |
| - | |
47 |
| - | |
48 |
| - | |
49 |
| - | |
| 46 | + | |
50 | 47 |
| |
51 | 48 |
| |
52 | 49 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 |
| - | |
47 |
| - | |
48 |
| - | |
49 |
| - | |
| 46 | + | |
50 | 47 |
| |
51 | 48 |
| |
52 | 49 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 |
| - | |
| 40 | + | |
44 | 41 |
| |
45 | 42 |
| |
46 | 43 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
267 | 267 |
| |
268 | 268 |
| |
269 | 269 |
| |
270 |
| - | |
271 |
| - | |
272 |
| - | |
273 |
| - | |
| 270 | + | |
274 | 271 |
| |
275 | 272 |
| |
276 | 273 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 |
| - | |
| 40 | + | |
44 | 41 |
| |
45 | 42 |
| |
46 | 43 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 |
| |
8 | 12 |
| |
9 | 13 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 |
| - | |
| 4 | + | |
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
274 | 274 |
| |
275 | 275 |
| |
276 | 276 |
| |
277 |
| - | |
278 |
| - | |
279 |
| - | |
280 |
| - | |
281 |
| - | |
282 |
| - | |
283 |
| - | |
284 |
| - | |
| 277 | + | |
285 | 278 |
| |
286 | 279 |
| |
287 | 280 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
294 | 294 |
| |
295 | 295 |
| |
296 | 296 |
| |
297 |
| - | |
298 |
| - | |
299 |
| - | |
300 |
| - | |
301 |
| - | |
302 |
| - | |
303 |
| - | |
304 |
| - | |
| 297 | + | |
305 | 298 |
| |
306 | 299 |
| |
307 | 300 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 |
| |
16 | 19 |
| |
17 | 20 |
| |
| |||
35 | 38 |
| |
36 | 39 |
| |
37 | 40 |
| |
38 |
| - | |
39 |
| - | |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 |
| - | |
44 |
| - | |
45 |
| - | |
| 41 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
314 | 314 |
| |
315 | 315 |
| |
316 | 316 |
| |
317 |
| - | |
318 |
| - | |
319 |
| - | |
320 |
| - | |
321 |
| - | |
322 |
| - | |
323 |
| - | |
324 |
| - | |
| 317 | + | |
325 | 318 |
| |
326 | 319 |
| |
327 | 320 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
346 | 346 |
| |
347 | 347 |
| |
348 | 348 |
| |
349 |
| - | |
350 |
| - | |
351 |
| - | |
352 |
| - | |
353 |
| - | |
354 |
| - | |
355 |
| - | |
356 |
| - | |
| 349 | + | |
357 | 350 |
| |
358 | 351 |
| |
359 | 352 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 |
| - | |
42 |
| - | |
43 |
| - | |
44 |
| - | |
45 |
| - | |
46 |
| - | |
47 |
| - | |
48 |
| - | |
| 41 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
329 | 329 |
| |
330 | 330 |
| |
331 | 331 |
| |
332 |
| - | |
333 |
| - | |
334 |
| - | |
335 |
| - | |
336 |
| - | |
337 |
| - | |
338 |
| - | |
339 |
| - | |
| 332 | + | |
340 | 333 |
| |
341 | 334 |
| |
342 | 335 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
343 | 343 |
| |
344 | 344 |
| |
345 | 345 |
| |
346 |
| - | |
347 |
| - | |
348 |
| - | |
349 |
| - | |
350 |
| - | |
351 |
| - | |
352 |
| - | |
353 |
| - | |
| 346 | + | |
354 | 347 |
| |
355 | 348 |
| |
356 | 349 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 |
| - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 |
| |
39 | 43 |
| |
40 | 44 |
| |
41 | 45 |
| |
42 | 46 |
| |
43 |
| - | |
44 |
| - | |
45 |
| - | |
46 |
| - | |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
| 47 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
331 | 331 |
| |
332 | 332 |
| |
333 | 333 |
| |
334 |
| - | |
335 |
| - | |
336 |
| - | |
337 |
| - | |
338 |
| - | |
339 |
| - | |
340 |
| - | |
341 |
| - | |
| 334 | + | |
342 | 335 |
| |
343 | 336 |
| |
344 | 337 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
345 | 345 |
| |
346 | 346 |
| |
347 | 347 |
| |
348 |
| - | |
349 |
| - | |
350 |
| - | |
351 |
| - | |
352 |
| - | |
353 |
| - | |
354 |
| - | |
355 |
| - | |
| 348 | + | |
356 | 349 |
| |
357 | 350 |
| |
358 | 351 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
20 |
| - | |
21 |
| - | |
| 19 | + | |
| 20 | + | |
22 | 21 |
| |
23 | 22 |
| |
24 | 23 |
| |
| |||
43 | 42 |
| |
44 | 43 |
| |
45 | 44 |
| |
46 |
| - | |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
51 |
| - | |
52 |
| - | |
53 |
| - | |
| 45 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
20 | 19 |
| |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
27 |
| - | |
28 |
| - | |
29 |
| - | |
30 |
| - | |
31 |
| - | |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
36 | 32 |
| |
37 | 33 |
| |
38 | 34 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
35 |
| - | |
36 | 35 |
| |
37 | 36 |
| |
| 37 | + | |
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
|
0 commit comments