File tree
474 files changed
+14354
-14729
lines changed- basic/sorting
- HeapSort
- MergeSort
- lcci
- 01.03.String to URL
- 02.05.Sum Lists
- 03.02.Min Stack
- 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
- lcof
- 面试题07. 重建二叉树
- 面试题12. 矩阵中的路径
- 面试题25. 合并两个排序的链表
- 面试题26. 树的子结构
- 面试题27. 二叉树的镜像
- 面试题29. 顺时针打印矩阵
- 面试题30. 包含min函数的栈
- 面试题32 - I. 从上到下打印二叉树
- 面试题32 - II. 从上到下打印二叉树 II
- 面试题32 - III. 从上到下打印二叉树 III
- 面试题33. 二叉搜索树的后序遍历序列
- 面试题34. 二叉树中和为某一值的路径
- 面试题45. 把数组排成最小的数
- 面试题54. 二叉搜索树的第k大节点
- 面试题55 - I. 二叉树的深度
- 面试题55 - II. 平衡二叉树
- 面试题64. 求1+2+…+n
- 面试题68 - I. 二叉搜索树的最近公共祖先
- 面试题68 - II. 二叉树的最近公共祖先
- lcof2
- 剑指 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
- 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
- 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
- 0296.Best Meeting Point
- 0300-0399
- 0304.Range Sum Query 2D - Immutable
- 0341.Flatten Nested List Iterator
- 0374.Guess Number Higher or Lower
- 0380.Insert Delete GetRandom O(1)
- 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
- 0470.Implement Rand10() Using Rand7()
- 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
- 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
- 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
- 0907.Sum of Subarray Minimums
- 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
- 1428.Leftmost Column with at Least a One
- 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
- 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
- 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
- 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
- 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
- 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.
474 files changed
+14354
-14729
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
480 | 480 |
| |
481 | 481 |
| |
482 | 482 |
| |
483 |
| - | |
484 |
| - | |
485 |
| - | |
486 |
| - | |
| 483 | + | |
487 | 484 |
| |
488 | 485 |
| |
489 | 486 |
| |
490 | 487 |
| |
491 | 488 |
| |
492 |
| - | |
493 |
| - | |
494 |
| - | |
495 |
| - | |
| 489 | + | |
496 | 490 |
| |
497 | 491 |
| |
498 | 492 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
302 | 302 |
| |
303 | 303 |
| |
304 | 304 |
| |
305 |
| - | |
306 |
| - | |
307 |
| - | |
308 |
| - | |
| 305 | + | |
309 | 306 |
| |
310 | 307 |
| |
311 | 308 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
181 | 181 |
| |
182 | 182 |
| |
183 | 183 |
| |
184 |
| - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
185 | 189 |
| |
186 | 190 |
| |
187 | 191 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
198 |
| - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
199 | 203 |
| |
200 | 204 |
| |
201 | 205 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
220 | 220 |
| |
221 | 221 |
| |
222 | 222 |
| |
223 |
| - | |
| 223 | + | |
224 | 224 |
| |
225 | 225 |
| |
226 | 226 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
224 | 224 |
| |
225 | 225 |
| |
226 | 226 |
| |
227 |
| - | |
| 227 | + | |
228 | 228 |
| |
229 | 229 |
| |
230 | 230 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
250 | 250 |
| |
251 | 251 |
| |
252 | 252 |
| |
253 |
| - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
254 | 257 |
| |
255 | 258 |
| |
256 | 259 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
270 | 270 |
| |
271 | 271 |
| |
272 | 272 |
| |
273 |
| - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
274 | 277 |
| |
275 | 278 |
| |
276 | 279 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
323 | 323 |
| |
324 | 324 |
| |
325 | 325 |
| |
326 |
| - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
327 | 331 |
| |
328 | 332 |
| |
329 | 333 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
337 | 337 |
| |
338 | 338 |
| |
339 | 339 |
| |
340 |
| - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
341 | 345 |
| |
342 | 346 |
| |
343 | 347 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
304 | 304 |
| |
305 | 305 |
| |
306 | 306 |
| |
307 |
| - | |
308 |
| - | |
309 |
| - | |
| 307 | + | |
| 308 | + | |
310 | 309 |
| |
311 | 310 |
| |
312 | 311 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
318 | 318 |
| |
319 | 319 |
| |
320 | 320 |
| |
321 |
| - | |
322 |
| - | |
323 |
| - | |
| 321 | + | |
| 322 | + | |
324 | 323 |
| |
325 | 324 |
| |
326 | 325 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
190 | 190 |
| |
191 | 191 |
| |
192 | 192 |
| |
193 |
| - | |
194 | 193 |
| |
| 194 | + | |
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
200 | 200 |
| |
201 |
| - | |
202 |
| - | |
203 |
| - | |
204 |
| - | |
205 |
| - | |
206 |
| - | |
207 |
| - | |
208 |
| - | |
209 |
| - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
210 | 206 |
| |
211 | 207 |
| |
212 | 208 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
214 | 214 |
| |
215 | 215 |
| |
216 | 216 |
| |
217 |
| - | |
218 | 217 |
| |
| 218 | + | |
219 | 219 |
| |
220 | 220 |
| |
221 | 221 |
| |
222 | 222 |
| |
223 | 223 |
| |
224 | 224 |
| |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
234 | 230 |
| |
235 | 231 |
| |
236 | 232 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
301 | 301 |
| |
302 | 302 |
| |
303 | 303 |
| |
304 |
| - | |
305 | 304 |
| |
306 | 305 |
| |
| 306 | + | |
307 | 307 |
| |
308 | 308 |
| |
309 | 309 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
314 | 314 |
| |
315 | 315 |
| |
316 | 316 |
| |
317 |
| - | |
318 | 317 |
| |
319 | 318 |
| |
| 319 | + | |
320 | 320 |
| |
321 | 321 |
| |
322 | 322 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
223 | 223 |
| |
224 | 224 |
| |
225 | 225 |
| |
226 |
| - | |
227 | 226 |
| |
| 227 | + | |
228 | 228 |
| |
229 | 229 |
| |
230 | 230 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
261 | 261 |
| |
262 | 262 |
| |
263 | 263 |
| |
264 |
| - | |
265 | 264 |
| |
| 265 | + | |
266 | 266 |
| |
267 | 267 |
| |
268 | 268 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
256 | 256 |
| |
257 | 257 |
| |
258 | 258 |
| |
259 |
| - | |
260 | 259 |
| |
| 260 | + | |
261 | 261 |
| |
262 | 262 |
| |
263 | 263 |
| |
264 | 264 |
| |
265 | 265 |
| |
266 | 266 |
| |
267 |
| - | |
268 |
| - | |
269 |
| - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
270 | 270 |
| |
271 | 271 |
| |
272 | 272 |
| |
| |||
276 | 276 |
| |
277 | 277 |
| |
278 | 278 |
| |
279 |
| - | |
| 279 | + | |
280 | 280 |
| |
281 | 281 |
| |
282 | 282 |
| |
283 | 283 |
| |
284 | 284 |
| |
285 |
| - | |
286 |
| - | |
287 |
| - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
288 | 288 |
| |
289 | 289 |
| |
290 | 290 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
264 | 264 |
| |
265 | 265 |
| |
266 | 266 |
| |
267 |
| - | |
268 | 267 |
| |
| 268 | + | |
269 | 269 |
| |
270 | 270 |
| |
271 | 271 |
| |
272 | 272 |
| |
273 | 273 |
| |
274 | 274 |
| |
275 |
| - | |
276 |
| - | |
277 |
| - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
278 | 278 |
| |
279 | 279 |
| |
280 | 280 |
| |
| |||
284 | 284 |
| |
285 | 285 |
| |
286 | 286 |
| |
287 |
| - | |
| 287 | + | |
288 | 288 |
| |
289 | 289 |
| |
290 | 290 |
| |
291 | 291 |
| |
292 | 292 |
| |
293 |
| - | |
294 |
| - | |
295 |
| - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
296 | 296 |
| |
297 | 297 |
| |
298 | 298 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
251 | 251 |
| |
252 | 252 |
| |
253 | 253 |
| |
254 |
| - | |
255 | 254 |
| |
256 | 255 |
| |
| 256 | + | |
257 | 257 |
| |
258 | 258 |
| |
259 | 259 |
| |
| |||
265 | 265 |
| |
266 | 266 |
| |
267 | 267 |
| |
268 |
| - | |
| 268 | + | |
269 | 269 |
| |
270 | 270 |
| |
271 | 271 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
264 | 264 |
| |
265 | 265 |
| |
266 | 266 |
| |
267 |
| - | |
268 | 267 |
| |
269 | 268 |
| |
| 269 | + | |
270 | 270 |
| |
271 | 271 |
| |
272 | 272 |
| |
| |||
278 | 278 |
| |
279 | 279 |
| |
280 | 280 |
| |
281 |
| - | |
| 281 | + | |
282 | 282 |
| |
283 | 283 |
| |
284 | 284 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
186 | 186 |
| |
187 | 187 |
| |
188 | 188 |
| |
189 |
| - | |
190 |
| - | |
191 |
| - | |
192 |
| - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
193 | 192 |
| |
194 | 193 |
| |
195 | 194 |
| |
|
0 commit comments