-
Notifications
You must be signed in to change notification settings - Fork 160
/
Copy pathTopics.md
636 lines (633 loc) · 37 KB
/
Topics.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
<p align="center"><img width="300" src="https://raw.githubusercontent.com/ZhaoxiZhang/LeetCodeCrawler/master/pictures/site-logo.png"></p>
<p align="center">
<img src="https://img.shields.io/badge/372/1264-Solved/Total-blue.svg" alt="">
<img src="https://img.shields.io/badge/Easy-174-green.svg" alt="">
<img src="https://img.shields.io/badge/Medium-171-orange.svg" alt="">
<img src="https://img.shields.io/badge/Hard-27-red.svg" alt="">
</p>
## Array
- [Two Sum](./0001.two-sum)
- [Container With Most Water](./0011.container-with-most-water)
- [3Sum](./0015.3sum)
- [3Sum Closest](./0016.3sum-closest)
- [Remove Duplicates from Sorted Array](./0026.remove-duplicates-from-sorted-array)
- [Remove Element](./0027.remove-element)
- [Next Permutation](./0031.next-permutation)
- [Search in Rotated Sorted Array](./0033.search-in-rotated-sorted-array)
- [Find First and Last Position of Element in Sorted Array](./0034.find-first-and-last-position-of-element-in-sorted-array)
- [Search Insert Position](./0035.search-insert-position)
- [First Missing Positive](./0041.first-missing-positive)
- [Trapping Rain Water](./0042.trapping-rain-water)
- [Rotate Image](./0048.rotate-image)
- [Maximum Subarray](./0053.maximum-subarray)
- [Spiral Matrix](./0054.spiral-matrix)
- [Merge Intervals](./0056.merge-intervals)
- [Insert Interval](./0057.insert-interval)
- [Spiral Matrix II](./0059.spiral-matrix-ii)
- [Unique Paths](./0062.unique-paths)
- [Unique Paths II](./0063.unique-paths-ii)
- [Minimum Path Sum](./0064.minimum-path-sum)
- [Plus One](./0066.plus-one)
- [Set Matrix Zeroes](./0073.set-matrix-zeroes)
- [Search a 2D Matrix](./0074.search-a-2d-matrix)
- [Sort Colors](./0075.sort-colors)
- [Subsets](./0078.subsets)
- [Word Search](./0079.word-search)
- [Remove Duplicates from Sorted Array II](./0080.remove-duplicates-from-sorted-array-ii)
- [Maximal Rectangle](./0085.maximal-rectangle)
- [Merge Sorted Array](./0088.merge-sorted-array)
- [Construct Binary Tree from Preorder and Inorder Traversal](./0105.construct-binary-tree-from-preorder-and-inorder-traversal)
- [Construct Binary Tree from Inorder and Postorder Traversal](./0106.construct-binary-tree-from-inorder-and-postorder-traversal)
- [Pascal's Triangle](./0118.pascals-triangle)
- [Pascal's Triangle II](./0119.pascals-triangle-ii)
- [Triangle](./0120.triangle)
- [Best Time to Buy and Sell Stock](./0121.best-time-to-buy-and-sell-stock)
- [Best Time to Buy and Sell Stock II](./0122.best-time-to-buy-and-sell-stock-ii)
- [Best Time to Buy and Sell Stock III](./0123.best-time-to-buy-and-sell-stock-iii)
- [Maximum Product Subarray](./0152.maximum-product-subarray)
- [Find Minimum in Rotated Sorted Array](./0153.find-minimum-in-rotated-sorted-array)
- [Find Minimum in Rotated Sorted Array II](./0154.find-minimum-in-rotated-sorted-array-ii)
- [Find Peak Element](./0162.find-peak-element)
- [Two Sum II - Input array is sorted](./0167.two-sum-ii-input-array-is-sorted)
- [Majority Element](./0169.majority-element)
- [Rotate Array](./0189.rotate-array)
- [Minimum Size Subarray Sum](./0209.minimum-size-subarray-sum)
- [Contains Duplicate](./0217.contains-duplicate)
- [Contains Duplicate II](./0219.contains-duplicate-ii)
- [Missing Number](./0268.missing-number)
- [Move Zeroes](./0283.move-zeroes)
- [Find the Duplicate Number](./0287.find-the-duplicate-number)
- [Find All Duplicates in an Array](./0442.find-all-duplicates-in-an-array)
- [Max Consecutive Ones](./0485.max-consecutive-ones)
- [Fibonacci Number](./0509.fibonacci-number)
- [Array Partition I](./0561.array-partition-i)
- [Valid Triangle Number](./0611.valid-triangle-number)
- [Maximum Average Subarray I](./0643.maximum-average-subarray-i)
- [Maximum Swap](./0670.maximum-swap)
- [Flipping an Image](./0832.flipping-an-image)
- [Transpose Matrix](./0867.transpose-matrix)
- [Sort Array By Parity](./0905.sort-array-by-parity)
- [Sort Array By Parity II](./0922.sort-array-by-parity-ii)
- [Reveal Cards In Increasing Order](./0950.reveal-cards-in-increasing-order)
- [Pancake Sorting](./0969.pancake-sorting)
- [Squares of a Sorted Array](./0977.squares-of-a-sorted-array)
- [Add to Array-Form of Integer](./0989.add-to-array-form-of-integer)
- [Find Common Characters](./1002.find-common-characters)
- [Height Checker](./1051.height-checker)
- [Duplicate Zeros](./1089.duplicate-zeros)
- [Compare Strings by Frequency of the Smallest Character](./1170.compare-strings-by-frequency-of-the-smallest-character)
- [Distance Between Bus Stops](./1184.distance-between-bus-stops)
- [Day of the Week](./1185.day-of-the-week)
- [Minimum Absolute Difference](./1200.minimum-absolute-difference)
- [Smallest String With Swaps](./1202.smallest-string-with-swaps)
- [Play with Chips](./1217.play-with-chips)
- [Remove Sub-Folders from the Filesystem](./1233.remove-sub-folders-from-the-filesystem)
- [Cells with Odd Values in a Matrix](./1252.cells-with-odd-values-in-a-matrix)
- [Shift 2D Grid](./1260.shift-2d-grid)
## Backtracking
- [Regular Expression Matching](./0010.regular-expression-matching)
- [Letter Combinations of a Phone Number](./0017.letter-combinations-of-a-phone-number)
- [Generate Parentheses](./0022.generate-parentheses)
- [Permutations II](./0047.permutations-ii)
- [Subsets](./0078.subsets)
- [Word Search](./0079.word-search)
- [Count Numbers with Unique Digits](./0357.count-numbers-with-unique-digits)
- [Path with Maximum Gold](./1219.path-with-maximum-gold)
- [Tiling a Rectangle with the Fewest Squares](./1240.tiling-a-rectangle-with-the-fewest-squares)
## Binary Indexed Tree
- [Count of Smaller Numbers After Self](./0315.count-of-smaller-numbers-after-self)
## Binary Search
- [Search in Rotated Sorted Array](./0033.search-in-rotated-sorted-array)
- [Find First and Last Position of Element in Sorted Array](./0034.find-first-and-last-position-of-element-in-sorted-array)
- [Search Insert Position](./0035.search-insert-position)
- [Pow(x, n)](./0050.powx-n)
- [Sqrt(x)](./0069.sqrtx)
- [Search a 2D Matrix](./0074.search-a-2d-matrix)
- [Find Minimum in Rotated Sorted Array](./0153.find-minimum-in-rotated-sorted-array)
- [Find Minimum in Rotated Sorted Array II](./0154.find-minimum-in-rotated-sorted-array-ii)
- [Find Peak Element](./0162.find-peak-element)
- [Two Sum II - Input array is sorted](./0167.two-sum-ii-input-array-is-sorted)
- [Minimum Size Subarray Sum](./0209.minimum-size-subarray-sum)
- [Count Complete Tree Nodes](./0222.count-complete-tree-nodes)
- [Kth Smallest Element in a BST](./0230.kth-smallest-element-in-a-bst)
- [Search a 2D Matrix II](./0240.search-a-2d-matrix-ii)
- [First Bad Version](./0278.first-bad-version)
- [Find the Duplicate Number](./0287.find-the-duplicate-number)
- [Longest Increasing Subsequence](./0300.longest-increasing-subsequence)
- [Count of Smaller Numbers After Self](./0315.count-of-smaller-numbers-after-self)
- [Intersection of Two Arrays](./0349.intersection-of-two-arrays)
- [Intersection of Two Arrays II](./0350.intersection-of-two-arrays-ii)
- [Guess Number Higher or Lower](./0374.guess-number-higher-or-lower)
- [Kth Smallest Element in a Sorted Matrix](./0378.kth-smallest-element-in-a-sorted-matrix)
- [Binary Search](./0704.binary-search)
- [Find Smallest Letter Greater Than Target](./0744.find-smallest-letter-greater-than-target)
- [Peak Index in a Mountain Array](./0852.peak-index-in-a-mountain-array)
- [Find Positive Integer Solution for a Given Equation](./1237.find-positive-integer-solution-for-a-given-equation)
## Binary Search Tree
- [Binary Search Tree to Greater Sum Tree](./1038.binary-search-tree-to-greater-sum-tree)
## Bit Manipulation
- [Subsets](./0078.subsets)
- [Single Number](./0136.single-number)
- [Single Number II](./0137.single-number-ii)
- [Majority Element](./0169.majority-element)
- [Number of 1 Bits](./0191.number-of-1-bits)
- [Bitwise AND of Numbers Range](./0201.bitwise-and-of-numbers-range)
- [Power of Two](./0231.power-of-two)
- [Single Number III](./0260.single-number-iii)
- [Missing Number](./0268.missing-number)
- [Counting Bits](./0338.counting-bits)
- [Power of Four](./0342.power-of-four)
- [Sum of Two Integers](./0371.sum-of-two-integers)
- [Find the Difference](./0389.find-the-difference)
- [Hamming Distance](./0461.hamming-distance)
- [Number Complement](./0476.number-complement)
- [Maximum Score Words Formed by Letters](./1255.maximum-score-words-formed-by-letters)
## Brainteaser
- [Nim Game](./0292.nim-game)
- [Bulb Switcher](./0319.bulb-switcher)
- [Airplane Seat Assignment Probability](./1227.airplane-seat-assignment-probability)
## Breadth-first Search
- [Symmetric Tree](./0101.symmetric-tree)
- [Binary Tree Level Order Traversal](./0102.binary-tree-level-order-traversal)
- [Binary Tree Zigzag Level Order Traversal](./0103.binary-tree-zigzag-level-order-traversal)
- [Binary Tree Level Order Traversal II](./0107.binary-tree-level-order-traversal-ii)
- [Minimum Depth of Binary Tree](./0111.minimum-depth-of-binary-tree)
- [Surrounded Regions](./0130.surrounded-regions)
- [Binary Tree Right Side View](./0199.binary-tree-right-side-view)
- [Number of Islands](./0200.number-of-islands)
- [Perfect Squares](./0279.perfect-squares)
- [N-ary Tree Level Order Traversal](./0429.n-ary-tree-level-order-traversal)
- [Find Bottom Left Tree Value](./0513.find-bottom-left-tree-value)
- [Find Largest Value in Each Tree Row](./0515.find-largest-value-in-each-tree-row)
- [Maximum Depth of N-ary Tree](./0559.maximum-depth-of-n-ary-tree)
- [Cousins in Binary Tree](./0993.cousins-in-binary-tree)
## Depth-first Search
- [Validate Binary Search Tree](./0098.validate-binary-search-tree)
- [Recover Binary Search Tree](./0099.recover-binary-search-tree)
- [Same Tree](./0100.same-tree)
- [Symmetric Tree](./0101.symmetric-tree)
- [Maximum Depth of Binary Tree](./0104.maximum-depth-of-binary-tree)
- [Construct Binary Tree from Preorder and Inorder Traversal](./0105.construct-binary-tree-from-preorder-and-inorder-traversal)
- [Construct Binary Tree from Inorder and Postorder Traversal](./0106.construct-binary-tree-from-inorder-and-postorder-traversal)
- [Convert Sorted Array to Binary Search Tree](./0108.convert-sorted-array-to-binary-search-tree)
- [Convert Sorted List to Binary Search Tree](./0109.convert-sorted-list-to-binary-search-tree)
- [Balanced Binary Tree](./0110.balanced-binary-tree)
- [Minimum Depth of Binary Tree](./0111.minimum-depth-of-binary-tree)
- [Path Sum](./0112.path-sum)
- [Path Sum II](./0113.path-sum-ii)
- [Flatten Binary Tree to Linked List](./0114.flatten-binary-tree-to-linked-list)
- [Populating Next Right Pointers in Each Node](./0116.populating-next-right-pointers-in-each-node)
- [Populating Next Right Pointers in Each Node II](./0117.populating-next-right-pointers-in-each-node-ii)
- [Binary Tree Maximum Path Sum](./0124.binary-tree-maximum-path-sum)
- [Sum Root to Leaf Numbers](./0129.sum-root-to-leaf-numbers)
- [Surrounded Regions](./0130.surrounded-regions)
- [Binary Tree Right Side View](./0199.binary-tree-right-side-view)
- [Number of Islands](./0200.number-of-islands)
- [Binary Tree Paths](./0257.binary-tree-paths)
- [Longest Increasing Path in a Matrix](./0329.longest-increasing-path-in-a-matrix)
- [House Robber III](./0337.house-robber-iii)
- [Flatten a Multilevel Doubly Linked List](./0430.flatten-a-multilevel-doubly-linked-list)
- [Find Bottom Left Tree Value](./0513.find-bottom-left-tree-value)
- [Find Largest Value in Each Tree Row](./0515.find-largest-value-in-each-tree-row)
- [Maximum Depth of N-ary Tree](./0559.maximum-depth-of-n-ary-tree)
- [Keys and Rooms](./0841.keys-and-rooms)
- [Leaf-Similar Trees](./0872.leaf-similar-trees)
- [Increasing Order Search Tree](./0897.increasing-order-search-tree)
- [Binary Tree Cameras](./0968.binary-tree-cameras)
- [Distribute Coins in Binary Tree](./0979.distribute-coins-in-binary-tree)
- [Smallest String Starting From Leaf](./0988.smallest-string-starting-from-leaf)
- [Maximum Difference Between Node and Ancestor](./1026.maximum-difference-between-node-and-ancestor)
- [Recover a Tree From Preorder Traversal](./1028.recover-a-tree-from-preorder-traversal)
- [Delete Nodes And Return Forest](./1110.delete-nodes-and-return-forest)
- [Lowest Common Ancestor of Deepest Leaves](./1123.lowest-common-ancestor-of-deepest-leaves)
- [Number of Closed Islands](./1254.number-of-closed-islands)
## Design
- [Min Stack](./0155.min-stack)
- [Binary Search Tree Iterator](./0173.binary-search-tree-iterator)
- [Implement Queue using Stacks](./0232.implement-queue-using-stacks)
- [Serialize and Deserialize Binary Tree](./0297.serialize-and-deserialize-binary-tree)
- [Design Linked List](./0707.design-linked-list)
## Divide and Conquer
- [Merge k Sorted Lists](./0023.merge-k-sorted-lists)
- [Maximum Subarray](./0053.maximum-subarray)
- [Majority Element](./0169.majority-element)
- [Kth Largest Element in an Array](./0215.kth-largest-element-in-an-array)
- [Search a 2D Matrix II](./0240.search-a-2d-matrix-ii)
- [Burst Balloons](./0312.burst-balloons)
- [Count of Smaller Numbers After Self](./0315.count-of-smaller-numbers-after-self)
## Dynamic Programming
- [Longest Palindromic Substring](./0005.longest-palindromic-substring)
- [Regular Expression Matching](./0010.regular-expression-matching)
- [Maximum Subarray](./0053.maximum-subarray)
- [Unique Paths](./0062.unique-paths)
- [Unique Paths II](./0063.unique-paths-ii)
- [Minimum Path Sum](./0064.minimum-path-sum)
- [Climbing Stairs](./0070.climbing-stairs)
- [Edit Distance](./0072.edit-distance)
- [Maximal Rectangle](./0085.maximal-rectangle)
- [Decode Ways](./0091.decode-ways)
- [Unique Binary Search Trees II](./0095.unique-binary-search-trees-ii)
- [Unique Binary Search Trees](./0096.unique-binary-search-trees)
- [Triangle](./0120.triangle)
- [Best Time to Buy and Sell Stock](./0121.best-time-to-buy-and-sell-stock)
- [Best Time to Buy and Sell Stock III](./0123.best-time-to-buy-and-sell-stock-iii)
- [Word Break](./0139.word-break)
- [Maximum Product Subarray](./0152.maximum-product-subarray)
- [House Robber](./0198.house-robber)
- [House Robber II](./0213.house-robber-ii)
- [Maximal Square](./0221.maximal-square)
- [Ugly Number II](./0264.ugly-number-ii)
- [Perfect Squares](./0279.perfect-squares)
- [Longest Increasing Subsequence](./0300.longest-increasing-subsequence)
- [Range Sum Query - Immutable](./0303.range-sum-query-immutable)
- [Burst Balloons](./0312.burst-balloons)
- [Coin Change](./0322.coin-change)
- [Counting Bits](./0338.counting-bits)
- [Integer Break](./0343.integer-break)
- [Count Numbers with Unique Digits](./0357.count-numbers-with-unique-digits)
- [Guess Number Higher or Lower II](./0375.guess-number-higher-or-lower-ii)
- [Continuous Subarray Sum](./0523.continuous-subarray-sum)
- [Stone Game](./0877.stone-game)
- [Minimum Falling Path Sum](./0931.minimum-falling-path-sum)
- [Binary Tree Cameras](./0968.binary-tree-cameras)
- [Divisor Game](./1025.divisor-game)
- [Last Stone Weight II](./1049.last-stone-weight-ii)
- [Minimum Cost Tree From Leaf Values](./1130.minimum-cost-tree-from-leaf-values)
- [Longest Common Subsequence](./1143.longest-common-subsequence)
- [Airplane Seat Assignment Probability](./1227.airplane-seat-assignment-probability)
- [Tiling a Rectangle with the Fewest Squares](./1240.tiling-a-rectangle-with-the-fewest-squares)
- [Greatest Sum Divisible by Three](./1262.greatest-sum-divisible-by-three)
## Graph
- [Keys and Rooms](./0841.keys-and-rooms)
- [Partition Array for Maximum Sum](./1043.partition-array-for-maximum-sum)
- [Maximum Level Sum of a Binary Tree](./1161.maximum-level-sum-of-a-binary-tree)
## Greedy
- [Best Time to Buy and Sell Stock II](./0122.best-time-to-buy-and-sell-stock-ii)
- [Partition Labels](./0763.partition-labels)
- [Walking Robot Simulation](./0874.walking-robot-simulation)
- [Minimum Add to Make Parentheses Valid](./0921.minimum-add-to-make-parentheses-valid)
- [Delete Columns to Make Sorted](./0944.delete-columns-to-make-sorted)
- [Last Stone Weight](./1046.last-stone-weight)
- [Play with Chips](./1217.play-with-chips)
- [Split a String in Balanced Strings](./1221.split-a-string-in-balanced-strings)
- [Minimum Swaps to Make Strings Equal](./1247.minimum-swaps-to-make-strings-equal)
## Hash Table
- [Two Sum](./0001.two-sum)
- [Longest Substring Without Repeating Characters](./0003.longest-substring-without-repeating-characters)
- [Group Anagrams](./0049.group-anagrams)
- [Minimum Window Substring](./0076.minimum-window-substring)
- [Maximal Rectangle](./0085.maximal-rectangle)
- [Binary Tree Inorder Traversal](./0094.binary-tree-inorder-traversal)
- [Single Number](./0136.single-number)
- [Copy List with Random Pointer](./0138.copy-list-with-random-pointer)
- [Happy Number](./0202.happy-number)
- [Count Primes](./0204.count-primes)
- [Contains Duplicate](./0217.contains-duplicate)
- [Contains Duplicate II](./0219.contains-duplicate-ii)
- [Valid Anagram](./0242.valid-anagram)
- [Word Pattern](./0290.word-pattern)
- [Intersection of Two Arrays](./0349.intersection-of-two-arrays)
- [Intersection of Two Arrays II](./0350.intersection-of-two-arrays-ii)
- [First Unique Character in a String](./0387.first-unique-character-in-a-string)
- [Find the Difference](./0389.find-the-difference)
- [Longest Palindrome](./0409.longest-palindrome)
- [Island Perimeter](./0463.island-perimeter)
- [Keyboard Row](./0500.keyboard-row)
- [Most Frequent Subtree Sum](./0508.most-frequent-subtree-sum)
- [Encode and Decode TinyURL](./0535.encode-and-decode-tinyurl)
- [Distribute Candies](./0575.distribute-candies)
- [Daily Temperatures](./0739.daily-temperatures)
- [Jewels and Stones](./0771.jewels-and-stones)
- [Rabbits in Forest](./0781.rabbits-in-forest)
- [Subdomain Visit Count](./0811.subdomain-visit-count)
- [Uncommon Words from Two Sentences](./0884.uncommon-words-from-two-sentences)
- [N-Repeated Element in Size 2N Array](./0961.n-repeated-element-in-size-2n-array)
- [Vertical Order Traversal of a Binary Tree](./0987.vertical-order-traversal-of-a-binary-tree)
- [Find Common Characters](./1002.find-common-characters)
- [Flip Columns For Maximum Number of Equal Rows](./1072.flip-columns-for-maximum-number-of-equal-rows)
- [Occurrences After Bigram](./1078.occurrences-after-bigram)
- [Maximum Number of Balloons](./1189.maximum-number-of-balloons)
- [Unique Number of Occurrences](./1207.unique-number-of-occurrences)
- [Find Elements in a Contaminated Binary Tree](./1261.find-elements-in-a-contaminated-binary-tree)
## Heap
- [Merge k Sorted Lists](./0023.merge-k-sorted-lists)
- [Kth Largest Element in an Array](./0215.kth-largest-element-in-an-array)
- [Sliding Window Maximum](./0239.sliding-window-maximum)
- [Ugly Number II](./0264.ugly-number-ii)
- [Kth Smallest Element in a Sorted Matrix](./0378.kth-smallest-element-in-a-sorted-matrix)
- [Last Stone Weight](./1046.last-stone-weight)
## Linked List
- [Add Two Numbers](./0002.add-two-numbers)
- [Remove Nth Node From End of List](./0019.remove-nth-node-from-end-of-list)
- [Merge Two Sorted Lists](./0021.merge-two-sorted-lists)
- [Merge k Sorted Lists](./0023.merge-k-sorted-lists)
- [Swap Nodes in Pairs](./0024.swap-nodes-in-pairs)
- [Reverse Nodes in k-Group](./0025.reverse-nodes-in-k-group)
- [Rotate List](./0061.rotate-list)
- [Remove Duplicates from Sorted List II](./0082.remove-duplicates-from-sorted-list-ii)
- [Remove Duplicates from Sorted List](./0083.remove-duplicates-from-sorted-list)
- [Partition List](./0086.partition-list)
- [Reverse Linked List II](./0092.reverse-linked-list-ii)
- [Convert Sorted List to Binary Search Tree](./0109.convert-sorted-list-to-binary-search-tree)
- [Copy List with Random Pointer](./0138.copy-list-with-random-pointer)
- [Linked List Cycle](./0141.linked-list-cycle)
- [Linked List Cycle II](./0142.linked-list-cycle-ii)
- [Reorder List](./0143.reorder-list)
- [Intersection of Two Linked Lists](./0160.intersection-of-two-linked-lists)
- [Remove Linked List Elements](./0203.remove-linked-list-elements)
- [Reverse Linked List](./0206.reverse-linked-list)
- [Palindrome Linked List](./0234.palindrome-linked-list)
- [Delete Node in a Linked List](./0237.delete-node-in-a-linked-list)
- [Odd Even Linked List](./0328.odd-even-linked-list)
- [Flatten a Multilevel Doubly Linked List](./0430.flatten-a-multilevel-doubly-linked-list)
- [Add Two Numbers II](./0445.add-two-numbers-ii)
- [Design Linked List](./0707.design-linked-list)
- [Split Linked List in Parts](./0725.split-linked-list-in-parts)
- [Linked List Components](./0817.linked-list-components)
- [Middle of the Linked List](./0876.middle-of-the-linked-list)
- [Next Greater Node In Linked List](./1019.next-greater-node-in-linked-list)
- [Remove Zero Sum Consecutive Nodes from Linked List](./1171.remove-zero-sum-consecutive-nodes-from-linked-list)
## Math
- [Add Two Numbers](./0002.add-two-numbers)
- [Reverse Integer](./0007.reverse-integer)
- [String to Integer (atoi)](./0008.string-to-integer-atoi)
- [Palindrome Number](./0009.palindrome-number)
- [Integer to Roman](./0012.integer-to-roman)
- [Roman to Integer](./0013.roman-to-integer)
- [Pow(x, n)](./0050.powx-n)
- [Valid Number](./0065.valid-number)
- [Add Binary](./0067.add-binary)
- [Sqrt(x)](./0069.sqrtx)
- [Excel Sheet Column Title](./0168.excel-sheet-column-title)
- [Excel Sheet Column Number](./0171.excel-sheet-column-number)
- [Happy Number](./0202.happy-number)
- [Count Primes](./0204.count-primes)
- [Power of Two](./0231.power-of-two)
- [Number of Digit One](./0233.number-of-digit-one)
- [Ugly Number](./0263.ugly-number)
- [Ugly Number II](./0264.ugly-number-ii)
- [Missing Number](./0268.missing-number)
- [Perfect Squares](./0279.perfect-squares)
- [Bulb Switcher](./0319.bulb-switcher)
- [Power of Three](./0326.power-of-three)
- [Integer Break](./0343.integer-break)
- [Count Numbers with Unique Digits](./0357.count-numbers-with-unique-digits)
- [Super Pow](./0372.super-pow)
- [Nth Digit](./0400.nth-digit)
- [Continuous Subarray Sum](./0523.continuous-subarray-sum)
- [Encode and Decode TinyURL](./0535.encode-and-decode-tinyurl)
- [Maximum Swap](./0670.maximum-swap)
- [Self Dividing Numbers](./0728.self-dividing-numbers)
- [Rabbits in Forest](./0781.rabbits-in-forest)
- [Stone Game](./0877.stone-game)
- [Smallest Range I](./0908.smallest-range-i)
- [DI String Match](./0942.di-string-match)
- [Complement of Base 10 Integer](./1009.complement-of-base-10-integer)
- [Divisor Game](./1025.divisor-game)
- [Robot Bounded In Circle](./1041.robot-bounded-in-circle)
- [Path In Zigzag Labelled Binary Tree](./1104.path-in-zigzag-labelled-binary-tree)
- [Day of the Year](./1154.day-of-the-year)
- [Play with Chips](./1217.play-with-chips)
- [Airplane Seat Assignment Probability](./1227.airplane-seat-assignment-probability)
- [Find Positive Integer Solution for a Given Equation](./1237.find-positive-integer-solution-for-a-given-equation)
- [Check If It Is a Good Array](./1250.check-if-it-is-a-good-array)
## Memoization
- [Longest Increasing Path in a Matrix](./0329.longest-increasing-path-in-a-matrix)
## Minimax
- [Nim Game](./0292.nim-game)
- [Guess Number Higher or Lower II](./0375.guess-number-higher-or-lower-ii)
- [Stone Game](./0877.stone-game)
## Ordered Map
- [Contains Duplicate III](./0220.contains-duplicate-iii)
## Queue
- [Number of Recent Calls](./0933.number-of-recent-calls)
## Random
- [Implement Rand10() Using Rand7()](./0470.implement-rand10-using-rand7)
## Recursion
- [Minimum Distance Between BST Nodes](./0783.minimum-distance-between-bst-nodes)
- [All Possible Full Binary Trees](./0894.all-possible-full-binary-trees)
- [Range Sum of BST](./0938.range-sum-of-bst)
## Rejection Sampling
- [Implement Rand10() Using Rand7()](./0470.implement-rand10-using-rand7)
## Segment Tree
- [Count of Smaller Numbers After Self](./0315.count-of-smaller-numbers-after-self)
## Sliding Window
- [Longest Substring Without Repeating Characters](./0003.longest-substring-without-repeating-characters)
- [Minimum Window Substring](./0076.minimum-window-substring)
- [Sliding Window Maximum](./0239.sliding-window-maximum)
- [Max Consecutive Ones III](./1004.max-consecutive-ones-iii)
## Sort
- [Merge Intervals](./0056.merge-intervals)
- [Insert Interval](./0057.insert-interval)
- [Sort Colors](./0075.sort-colors)
- [Largest Number](./0179.largest-number)
- [Contains Duplicate III](./0220.contains-duplicate-iii)
- [Valid Anagram](./0242.valid-anagram)
- [Count of Smaller Numbers After Self](./0315.count-of-smaller-numbers-after-self)
- [Intersection of Two Arrays](./0349.intersection-of-two-arrays)
- [Intersection of Two Arrays II](./0350.intersection-of-two-arrays-ii)
- [Sort Array By Parity II](./0922.sort-array-by-parity-ii)
- [Pancake Sorting](./0969.pancake-sorting)
## Stack
- [Valid Parentheses](./0020.valid-parentheses)
- [Trapping Rain Water](./0042.trapping-rain-water)
- [Simplify Path](./0071.simplify-path)
- [Maximal Rectangle](./0085.maximal-rectangle)
- [Binary Tree Inorder Traversal](./0094.binary-tree-inorder-traversal)
- [Binary Tree Zigzag Level Order Traversal](./0103.binary-tree-zigzag-level-order-traversal)
- [Binary Tree Preorder Traversal](./0144.binary-tree-preorder-traversal)
- [Binary Tree Postorder Traversal](./0145.binary-tree-postorder-traversal)
- [Evaluate Reverse Polish Notation](./0150.evaluate-reverse-polish-notation)
- [Min Stack](./0155.min-stack)
- [Binary Search Tree Iterator](./0173.binary-search-tree-iterator)
- [Implement Queue using Stacks](./0232.implement-queue-using-stacks)
- [Verify Preorder Serialization of a Binary Tree](./0331.verify-preorder-serialization-of-a-binary-tree)
- [Next Greater Element I](./0496.next-greater-element-i)
- [Next Greater Element II](./0503.next-greater-element-ii)
- [Daily Temperatures](./0739.daily-temperatures)
- [Minimum Add to Make Parentheses Valid](./0921.minimum-add-to-make-parentheses-valid)
- [Validate Stack Sequences](./0946.validate-stack-sequences)
- [Next Greater Node In Linked List](./1019.next-greater-node-in-linked-list)
- [Remove Outermost Parentheses](./1021.remove-outermost-parentheses)
- [Minimum Cost Tree From Leaf Values](./1130.minimum-cost-tree-from-leaf-values)
- [Reverse Substrings Between Each Pair of Parentheses](./1190.reverse-substrings-between-each-pair-of-parentheses)
- [Remove All Adjacent Duplicates in String II](./1209.remove-all-adjacent-duplicates-in-string-ii)
- [Minimum Remove to Make Valid Parentheses](./1249.minimum-remove-to-make-valid-parentheses)
## String
- [Longest Substring Without Repeating Characters](./0003.longest-substring-without-repeating-characters)
- [Longest Palindromic Substring](./0005.longest-palindromic-substring)
- [ZigZag Conversion](./0006.zigzag-conversion)
- [String to Integer (atoi)](./0008.string-to-integer-atoi)
- [Regular Expression Matching](./0010.regular-expression-matching)
- [Integer to Roman](./0012.integer-to-roman)
- [Roman to Integer](./0013.roman-to-integer)
- [Longest Common Prefix](./0014.longest-common-prefix)
- [Letter Combinations of a Phone Number](./0017.letter-combinations-of-a-phone-number)
- [Valid Parentheses](./0020.valid-parentheses)
- [Generate Parentheses](./0022.generate-parentheses)
- [Group Anagrams](./0049.group-anagrams)
- [Length of Last Word](./0058.length-of-last-word)
- [Valid Number](./0065.valid-number)
- [Add Binary](./0067.add-binary)
- [Simplify Path](./0071.simplify-path)
- [Edit Distance](./0072.edit-distance)
- [Minimum Window Substring](./0076.minimum-window-substring)
- [Decode Ways](./0091.decode-ways)
- [Valid Palindrome](./0125.valid-palindrome)
- [Reverse Words in a String](./0151.reverse-words-in-a-string)
- [Reverse String](./0344.reverse-string)
- [Reverse Vowels of a String](./0345.reverse-vowels-of-a-string)
- [Ransom Note](./0383.ransom-note)
- [First Unique Character in a String](./0387.first-unique-character-in-a-string)
- [Add Strings](./0415.add-strings)
- [Number of Segments in a String](./0434.number-of-segments-in-a-string)
- [Repeated Substring Pattern](./0459.repeated-substring-pattern)
- [Detect Capital](./0520.detect-capital)
- [Longest Uncommon Subsequence I ](./0521.longest-uncommon-subsequence-i)
- [Reverse String II](./0541.reverse-string-ii)
- [Student Attendance Record I](./0551.student-attendance-record-i)
- [Next Greater Element III](./0556.next-greater-element-iii)
- [Reverse Words in a String III](./0557.reverse-words-in-a-string-iii)
- [Delete Operation for Two Strings](./0583.delete-operation-for-two-strings)
- [Construct String from Binary Tree](./0606.construct-string-from-binary-tree)
- [Robot Return to Origin](./0657.robot-return-to-origin)
- [To Lower Case](./0709.to-lower-case)
- [Rotated Digits](./0788.rotated-digits)
- [Custom Sort String](./0791.custom-sort-string)
- [Unique Morse Code Words](./0804.unique-morse-code-words)
- [Most Common Word](./0819.most-common-word)
- [Goat Latin](./0824.goat-latin)
- [Buddy Strings](./0859.buddy-strings)
- [Reverse Only Letters](./0917.reverse-only-letters)
- [Unique Email Addresses](./0929.unique-email-addresses)
- [Greatest Common Divisor of Strings](./1071.greatest-common-divisor-of-strings)
- [Parsing A Boolean Expression](./1106.parsing-a-boolean-expression)
- [Defanging an IP Address](./1108.defanging-an-ip-address)
- [Compare Strings by Frequency of the Smallest Character](./1170.compare-strings-by-frequency-of-the-smallest-character)
- [Maximum Number of Balloons](./1189.maximum-number-of-balloons)
- [Split a String in Balanced Strings](./1221.split-a-string-in-balanced-strings)
- [Remove Sub-Folders from the Filesystem](./1233.remove-sub-folders-from-the-filesystem)
- [Minimum Swaps to Make Strings Equal](./1247.minimum-swaps-to-make-strings-equal)
- [Minimum Remove to Make Valid Parentheses](./1249.minimum-remove-to-make-valid-parentheses)
## Topological Sort
- [Longest Increasing Path in a Matrix](./0329.longest-increasing-path-in-a-matrix)
## Tree
- [Binary Tree Inorder Traversal](./0094.binary-tree-inorder-traversal)
- [Unique Binary Search Trees II](./0095.unique-binary-search-trees-ii)
- [Unique Binary Search Trees](./0096.unique-binary-search-trees)
- [Validate Binary Search Tree](./0098.validate-binary-search-tree)
- [Recover Binary Search Tree](./0099.recover-binary-search-tree)
- [Same Tree](./0100.same-tree)
- [Symmetric Tree](./0101.symmetric-tree)
- [Binary Tree Level Order Traversal](./0102.binary-tree-level-order-traversal)
- [Binary Tree Zigzag Level Order Traversal](./0103.binary-tree-zigzag-level-order-traversal)
- [Maximum Depth of Binary Tree](./0104.maximum-depth-of-binary-tree)
- [Construct Binary Tree from Preorder and Inorder Traversal](./0105.construct-binary-tree-from-preorder-and-inorder-traversal)
- [Construct Binary Tree from Inorder and Postorder Traversal](./0106.construct-binary-tree-from-inorder-and-postorder-traversal)
- [Binary Tree Level Order Traversal II](./0107.binary-tree-level-order-traversal-ii)
- [Convert Sorted Array to Binary Search Tree](./0108.convert-sorted-array-to-binary-search-tree)
- [Balanced Binary Tree](./0110.balanced-binary-tree)
- [Minimum Depth of Binary Tree](./0111.minimum-depth-of-binary-tree)
- [Path Sum](./0112.path-sum)
- [Path Sum II](./0113.path-sum-ii)
- [Flatten Binary Tree to Linked List](./0114.flatten-binary-tree-to-linked-list)
- [Populating Next Right Pointers in Each Node](./0116.populating-next-right-pointers-in-each-node)
- [Populating Next Right Pointers in Each Node II](./0117.populating-next-right-pointers-in-each-node-ii)
- [Binary Tree Maximum Path Sum](./0124.binary-tree-maximum-path-sum)
- [Sum Root to Leaf Numbers](./0129.sum-root-to-leaf-numbers)
- [Binary Tree Preorder Traversal](./0144.binary-tree-preorder-traversal)
- [Binary Tree Postorder Traversal](./0145.binary-tree-postorder-traversal)
- [Binary Search Tree Iterator](./0173.binary-search-tree-iterator)
- [Binary Tree Right Side View](./0199.binary-tree-right-side-view)
- [Count Complete Tree Nodes](./0222.count-complete-tree-nodes)
- [Invert Binary Tree](./0226.invert-binary-tree)
- [Kth Smallest Element in a BST](./0230.kth-smallest-element-in-a-bst)
- [Lowest Common Ancestor of a Binary Search Tree](./0235.lowest-common-ancestor-of-a-binary-search-tree)
- [Lowest Common Ancestor of a Binary Tree](./0236.lowest-common-ancestor-of-a-binary-tree)
- [Binary Tree Paths](./0257.binary-tree-paths)
- [Serialize and Deserialize Binary Tree](./0297.serialize-and-deserialize-binary-tree)
- [House Robber III](./0337.house-robber-iii)
- [Sum of Left Leaves](./0404.sum-of-left-leaves)
- [N-ary Tree Level Order Traversal](./0429.n-ary-tree-level-order-traversal)
- [Path Sum III](./0437.path-sum-iii)
- [Serialize and Deserialize BST](./0449.serialize-and-deserialize-bst)
- [Most Frequent Subtree Sum](./0508.most-frequent-subtree-sum)
- [Find Bottom Left Tree Value](./0513.find-bottom-left-tree-value)
- [Find Largest Value in Each Tree Row](./0515.find-largest-value-in-each-tree-row)
- [Minimum Absolute Difference in BST](./0530.minimum-absolute-difference-in-bst)
- [Convert BST to Greater Tree](./0538.convert-bst-to-greater-tree)
- [Diameter of Binary Tree](./0543.diameter-of-binary-tree)
- [Maximum Depth of N-ary Tree](./0559.maximum-depth-of-n-ary-tree)
- [N-ary Tree Preorder Traversal](./0589.n-ary-tree-preorder-traversal)
- [N-ary Tree Postorder Traversal](./0590.n-ary-tree-postorder-traversal)
- [Construct String from Binary Tree](./0606.construct-string-from-binary-tree)
- [Merge Two Binary Trees](./0617.merge-two-binary-trees)
- [Average of Levels in Binary Tree](./0637.average-of-levels-in-binary-tree)
- [Two Sum IV - Input is a BST](./0653.two-sum-iv-input-is-a-bst)
- [Maximum Binary Tree](./0654.maximum-binary-tree)
- [Print Binary Tree](./0655.print-binary-tree)
- [Maximum Width of Binary Tree](./0662.maximum-width-of-binary-tree)
- [Trim a Binary Search Tree](./0669.trim-a-binary-search-tree)
- [Second Minimum Node In a Binary Tree](./0671.second-minimum-node-in-a-binary-tree)
- [Search in a Binary Search Tree](./0700.search-in-a-binary-search-tree)
- [Insert into a Binary Search Tree](./0701.insert-into-a-binary-search-tree)
- [Minimum Distance Between BST Nodes](./0783.minimum-distance-between-bst-nodes)
- [Binary Tree Pruning](./0814.binary-tree-pruning)
- [Leaf-Similar Trees](./0872.leaf-similar-trees)
- [All Possible Full Binary Trees](./0894.all-possible-full-binary-trees)
- [Increasing Order Search Tree](./0897.increasing-order-search-tree)
- [Range Sum of BST](./0938.range-sum-of-bst)
- [Flip Equivalent Binary Trees](./0951.flip-equivalent-binary-trees)
- [Check Completeness of a Binary Tree](./0958.check-completeness-of-a-binary-tree)
- [Univalued Binary Tree](./0965.univalued-binary-tree)
- [Binary Tree Cameras](./0968.binary-tree-cameras)
- [Distribute Coins in Binary Tree](./0979.distribute-coins-in-binary-tree)
- [Vertical Order Traversal of a Binary Tree](./0987.vertical-order-traversal-of-a-binary-tree)
- [Smallest String Starting From Leaf](./0988.smallest-string-starting-from-leaf)
- [Cousins in Binary Tree](./0993.cousins-in-binary-tree)
- [Maximum Binary Tree II](./0998.maximum-binary-tree-ii)
- [Construct Binary Search Tree from Preorder Traversal](./1008.construct-binary-search-tree-from-preorder-traversal)
- [Sum of Root To Leaf Binary Numbers](./1022.sum-of-root-to-leaf-binary-numbers)
- [Maximum Difference Between Node and Ancestor](./1026.maximum-difference-between-node-and-ancestor)
- [Recover a Tree From Preorder Traversal](./1028.recover-a-tree-from-preorder-traversal)
- [Path In Zigzag Labelled Binary Tree](./1104.path-in-zigzag-labelled-binary-tree)
- [Delete Nodes And Return Forest](./1110.delete-nodes-and-return-forest)
- [Lowest Common Ancestor of Deepest Leaves](./1123.lowest-common-ancestor-of-deepest-leaves)
- [Minimum Cost Tree From Leaf Values](./1130.minimum-cost-tree-from-leaf-values)
- [Find Elements in a Contaminated Binary Tree](./1261.find-elements-in-a-contaminated-binary-tree)
## Two Pointers
- [Longest Substring Without Repeating Characters](./0003.longest-substring-without-repeating-characters)
- [Container With Most Water](./0011.container-with-most-water)
- [3Sum](./0015.3sum)
- [3Sum Closest](./0016.3sum-closest)
- [Remove Nth Node From End of List](./0019.remove-nth-node-from-end-of-list)
- [Remove Duplicates from Sorted Array](./0026.remove-duplicates-from-sorted-array)
- [Remove Element](./0027.remove-element)
- [Trapping Rain Water](./0042.trapping-rain-water)
- [Rotate List](./0061.rotate-list)
- [Sort Colors](./0075.sort-colors)
- [Minimum Window Substring](./0076.minimum-window-substring)
- [Remove Duplicates from Sorted Array II](./0080.remove-duplicates-from-sorted-array-ii)
- [Partition List](./0086.partition-list)
- [Merge Sorted Array](./0088.merge-sorted-array)
- [Valid Palindrome](./0125.valid-palindrome)
- [Linked List Cycle](./0141.linked-list-cycle)
- [Linked List Cycle II](./0142.linked-list-cycle-ii)
- [Two Sum II - Input array is sorted](./0167.two-sum-ii-input-array-is-sorted)
- [Minimum Size Subarray Sum](./0209.minimum-size-subarray-sum)
- [Palindrome Linked List](./0234.palindrome-linked-list)
- [Move Zeroes](./0283.move-zeroes)
- [Find the Duplicate Number](./0287.find-the-duplicate-number)
- [Reverse String](./0344.reverse-string)
- [Reverse Vowels of a String](./0345.reverse-vowels-of-a-string)
- [Intersection of Two Arrays](./0349.intersection-of-two-arrays)
- [Intersection of Two Arrays II](./0350.intersection-of-two-arrays-ii)
- [Partition Labels](./0763.partition-labels)
- [Squares of a Sorted Array](./0977.squares-of-a-sorted-array)
- [Interval List Intersections](./0986.interval-list-intersections)
- [Max Consecutive Ones III](./1004.max-consecutive-ones-iii)
- [Count Number of Nice Subarrays](./1248.count-number-of-nice-subarrays)
## Union Find
- [Surrounded Regions](./0130.surrounded-regions)
- [Number of Islands](./0200.number-of-islands)
- [Smallest String With Swaps](./1202.smallest-string-with-swaps)