-
Notifications
You must be signed in to change notification settings - Fork 211
Expand file tree
/
Copy pathREADME.md
More file actions
executable file
·777 lines (503 loc) · 63.8 KB
/
Copy pathREADME.md
File metadata and controls
executable file
·777 lines (503 loc) · 63.8 KB
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
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
# Algorithm Learning
## LeetCode
[1.Two Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/1.Two%20Sum.md)
[2.Add Two Numbers](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/2.%20Add%20Two%20Numbers.md)
[3.Longest Substring Without Repeating Characters](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/3.%20Longest%20Substring%20Without%20Repeating%20Characters.md)
[4.Median of Two Sorted Arrays](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/4.%20Median%20of%20Two%20Sorted%20Arrays.md)
[5. Longest Palindromic Substring](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/5.%20Longest%20Palindromic%20Substring.md)
[6. ZigZag Conversion](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/6.%20ZigZag%20Conversion.md)
[7. Reverse Integer](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/7.%20Reverse%20Integer.md)
[8. String to Integer (atoi)](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/8.%20String%20to%20Integer%20(atoi).md)
[9. Palindrome Number](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/9.%20Palindrome%20Number.md)
[10. Regular Expression Matching](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/10.%20Regular%20Expression%20Matching.md)
[11. Container With Most Water](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/11.%20Container%20With%20Most%20Water.md)
[12. Integer to Roman](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/12.%20Integer%20to%20Roman.md)
[13. Roman to Integer](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/13.%20Roman%20to%20Integer.md)
[14.LongestCommonPrefix](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/14.LongestCommonPrefix.md)
[15. 3Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/15.%203Sum.md)
[16. 3Sum Closest](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/16.%203Sum%20Closest.md)
[17. Letter Combinations of a Phone Number](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/17.%20Letter%20Combinations%20of%20a%20Phone%20Number.md)
[18. 4Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/18.%204Sum.md)
[19. Remove Nth Node From End of List](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/19.%20Remove%20Nth%20Node%20From%20End%20of%20List.md)
[20. Valid Parentheses](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/20.%20Valid%20Parentheses.md)
[21. Merge Two Sorted Lists](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/21.%20Merge%20Two%20Sorted%20Lists.md)
[22. Generate Parentheses](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/22.%20Generate%20Parentheses.md)
[23. Merge k Sorted Lists](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/23.%20Merge%20k%20Sorted%20Lists.md)
[24. Swap Nodes in Pairs](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/24.%20Swap%20Nodes%20in%20Pairs.md)
[25. Reverse Nodes in k-Group](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/25.%20Reverse%20Nodes%20in%20k-Group.md)
[26. Remove Duplicates from Sorted Array](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/26.%20Remove%20Duplicates%20from%20Sorted%20Array.md)
[27. Remove Element](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/27.%20Remove%20Element.md)
[28. Implement strStr()](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/28.%20Implement%20strStr().md)
[29. Divide Two Integers](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/29.%20Divide20Two20Integers.md)
[30. Substring with Concatenation of All Words](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/30.%20Substring%20with%20Concatenation%20of%20All%20Words.md)
[31. Next Permutation](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/31.%20Next%20Permutation.md)
[32. Longest Valid Parentheses](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/32.%20Longest%20Valid%20Parentheses.md)
[33. Search in Rotated Sorted Array](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/33.%20Search%20in%20Rotated%20Sorted%20Array.md)
[34. Find First and Last Position of Element in Sorted Array](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/34.%20Find%20First%20and%20Last%20Position%20of%20Element%20in%20Sorted%20Array.md)
[35. Search Insert Position](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/35.%20Search%20Insert%20Position.md)
[36. Valid Sudoku](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/36.%20Valid%20Sudoku.md)
[37. Sudoku Solver](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/37.%20Sudoku%20Solver.md)
[38. Count and Say](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/38.%20Count%20and%20Say.md)
[39. Combination Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/39.%20Combination%20Sum.md)
[40. Combination Sum II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/40.%20Combination%20Sum%20II.md)
[41. First Missing Positive](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/41.%20First%20Missing%20Positive.md)
[42. Trapping Rain Water](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/42.%20Trapping%20Rain%20Water.md)
[43. Multiply Strings](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/43.%20Multiply%20Strings.md)
[44. Wildcard Matching](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/44.%20Wildcard%20Matching.md)
[45. Jump Game II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/45.%20Jump%20Game%20II.md)
[46. Permutations](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/46.%20Permutations.md)
[47. Permutations II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/47.%20Permutations%20II.md)
[48. Rotate Image](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/48.%20Rotate%20Image.md)
[49. Group Anagrams](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/49.%20Group%20Anagrams.md)
[50. Pow(x, n)](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/50.%20Pow(x,%20n).md)
[51. N-Queens](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/51.%20N-Queens.md)
[52. N-Queens II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/52.%20N-Queens%20II.md)
[53. Maximum Subarray](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/53.%20Maximum%20Subarray.md)
[54. Spiral Matrix](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/54.%20Spiral%20Matrix.md)
[55. Jump Game](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/55.%20Jump%20Game.md)
[56. Merge Intervals](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/56.%20Merge%20Intervals.md)
[57. Insert Interval](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/57.%20Insert%20Interval.md)
[58. Length of Last Word](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/58.%20Length%20of%20Last%20Word.md)
[59. Spiral Matrix II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/59.%20Spiral%20Matrix%20II.md)
[60. Permutation Sequence](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/60.%20Permutation%20Sequence.md)
[61. Rotate List](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/61.%20Rotate%20List.md)
[62. Unique Paths](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/62.%20Unique%20Paths.md)
[63. Unique Paths II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/63.%20Unique%20Paths%20II.md)
[64. Minimum Path Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/64.%20Minimum%20Path%20Sum.md)
[65. Valid Number](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/65.%20Valid%20Number.md)
[66. Plus One](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/66.%20Plus%20One.md)
[67. Add Binary](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/67.%20Add%20Binary.md)
[69. Sqrt(x)](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/69.%20Sqrt(x).md)
[70. Climbing Stairs](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/70.%20Climbing%20Stairs.md)
[71. Simplify Path](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/71.%20Simplify%20Path.md)
[72. Edit Distance](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/72.%20Edit%20Distance.md)
[73. Set Matrix Zeroes](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/73.%20Set%20Matrix%20Zeroes.md)
[74. Search a 2D Matrix](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/74.%20Search%20a%202D%20Matrix.md)
[75. Sort Colors](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/75.%20Sort%20Colors.md)
[76. Minimum Window Substring](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/76.%20Minimum%20Window%20Substring.md)
[77. Combinations](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/77.%20Combinations.md)
[78. Subsets](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/78.%20Subsets.md)
[79. Word Search](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/79.%20Word%20Search.md)
[80. Remove Duplicates from Sorted Array II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/80.%20Remove%20Duplicates%20from%20Sorted%20Array%20II.md)
[81. Search in Rotated Sorted Array II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/81.%20Search%20in%20Rotated%20Sorted%20Array%20II.md)
[82. Remove Duplicates from Sorted List II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/82.%20Remove%20Duplicates%20from%20Sorted%20List%20II.md)
[83. Remove Duplicates from Sorted List](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/83.%20Remove%20Duplicates%20from%20Sorted%20List.md)
[84. Largest Rectangle in Histogram](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/84.%20Largest%20Rectangle%20in%20Histogram.md)
[85. Maximal Rectangle](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/85.%20Maximal%20Rectangle.md)
[86. Partition List](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/86.%20Partition%20List.md)
[88. Merge Sorted Array](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/88.%20Merge%20Sorted%20Array.md)
[89. Gray Code](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/89.%20Gray%20Code.md)
[90. Subsets II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/90.%20Subsets%20II.md)
[91. Decode Ways](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/91.%20Decode20Ways.md)
[92. Reverse Linked List II.md](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/92.%20Reverse%20Linked%20List%20II.md)
[93. Restore IP Addresses](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/93.%20Restore%20IP%20Addresses.md)
[94. Binary Tree Inorder Traversal](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/94.%20Binary%20Tree%20Inorder%20Traversal.md)
[95. Unique Binary Search Trees II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/95.%20Unique%20Binary%20Search%20Trees%20II.md)
[96. Unique Binary Search Trees](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/96.%20Unique%20Binary%20Search%20Trees.md)
[97. Interleaving String](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/97.%20Interleaving%20String.md)
[98. Validate Binary Search Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/98.%20Validate%20Binary%20Search%20Tree.md)
[100. Same Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/100.%20Same%20Tree.md)
[101. Symmetric Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/101.%20Symmetric%20Tree.md)
[102. Binary Tree Level Order Traversal](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/102.%20Binary%20Tree%20Level%20Order%20Traversal.md)
[103. Binary Tree Zigzag Level Order Traversal](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/103.%20Binary%20Tree%20Zigzag%20Level%20Order%20Traversal.md)
[104. Maximum Depth of Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/104.%20Maximum%20Depth%20of%20Binary%20Tree.md)
[105. Construct Binary Tree from Preorder and Inorder Traversal](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/105.%20Construct%20Binary%20Tree%20from%20Preorder%20and%20Inorder%20Traversal.md)
[106. Construct Binary Tree from Inorder and Postorder Traversal](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/106.%20Construct%20Binary%20Tree%20from%20Inorder%20and%20Postorder%20Traversal.md)
[107. Binary Tree Level Order Traversal II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/107.%20Binary%20Tree%20Level%20Order%20Traversal%20II.md)
[108. Convert Sorted Array to Binary Search Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/108.%20Convert%20Sorted%20Array%20to%20Binary%20Search%20Tree.md)
[109. Convert Sorted List to Binary Search Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/109.%20Convert%20Sorted%20List%20to%20Binary%20Search%20Tree.md)
[110. Balanced Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/110.%20Balanced%20Binary%20Tree.md)
[111. Minimum Depth of Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/111.%20Minimum%20Depth%20of%20Binary%20Tree.md)
[112. Path Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/112.%20Path%20Sum.md)
[113. Path Sum II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/113.%20Path%20Sum%20II.md)
[114. Flatten Binary Tree to Linked List](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/114.%20Flatten%20Binary%20Tree%20to%20Linked%20List.md)
[115. Distinct Subsequences](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/115.%20Distinct%20Subsequences.md)
[116. Populating Next Right Pointers in Each Node](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/116.%20Populating%20Next%20Right%20Pointers%20in%20Each%20Node.md)
[117. Populating Next Right Pointers in Each Node II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/117.%20Populating%20Next%20Right%20Pointers%20in%20Each%20Node%20II.md)
[118. Pascal's Triangle](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/118.%20Pascal's%20Triangle.md)
[119. Pascal's Triangle II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/118.%20Pascal's%20Triangle%20II.md)
[120. Triangle](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/120.%20Triangle.md)
[121. Best Time to Buy and Sell Stock](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/121.%20Best%20Time%20to%20Buy%20and%20Sell%20Stock.md)
[122. Best Time to Buy and Sell Stock II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/122.%20Best%20Time%20to%20Buy%20and%20Sell%20Stock%20II.md)
[123. Best Time to Buy and Sell Stock III](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/123.%20Best%20Time%20to%20Buy%20and%20Sell%20Stock%20III.md)
[124. Binary Tree Maximum Path Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/124.%20Binary%20Tree%20Maximum%20Path%20Sum.md)
[125. Valid Palindrome](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/125.%20Valid%20Palindrome.md)
[126. Word Ladder II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/126.%20Word%20Ladder%20II.md)
[127. Word Ladder](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/127.%20Word%20Ladder.md)
[128. Longest Consecutive Sequence](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/128.%20Longest%20Consecutive%20Sequence.md)
[129. Sum Root to Leaf Numbers](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/129.%20Sum%20Root%20to%20Leaf%20Numbers.md)
[130. Surrounded Regions](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/130.%20Surrounded%20Regions.md)
[131. Palindrome Partitioning](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/131.%20Palindrome%20Partitioning.md)
[132. Palindrome Partitioning II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/132.%20Palindrome%20Partitioning%20II.md)
[133. Clone Graph](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/133.%20Clone%20Graph.md)
[134. Gas Station](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/134.%20Gas%20Station.md)
[136. Single Number](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/136.%20Single%20Number.md)
[137. Single Number II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/137.%20Single%20Number%20II.md)
[138. Copy List with Random Pointer](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/138.%20Copy%20List%20with%20Random%20Pointer.md)
[139. Word Break](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/139.%20Word%20Break.md)
[140. Word Break II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/140.%20Word%20Break%20II.md)
[141. Linked List Cycle](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/141.%20Linked%20List%20Cycle.md)
[142. Linked List Cycle II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/142.%20Linked%20List%20Cycle%20II.md)
[143. Reorder List](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/143.%20Reorder%20List.md)
[144. Binary Tree Preorder Traversal](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/144.%20Binary%20Tree%20Preorder%20Traversal.md)
[145. Binary Tree Postorder Traversal](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/145.%20Binary%20Tree%20Postorder%20Traversal.md)
[147. Insertion Sort List](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/147.%20Insertion%20Sort%20List.md)
[148. Sort List](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/148.%20Sort%20List.md)
[150. Evaluate Reverse Polish Notation](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/150.%20Evaluate%20Reverse%20Polish%20Notation.md)
[152. Maximum Product Subarray](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/152.%20Maximum%20Product%20Subarray.md)
[153. Find Minimum in Rotated Sorted Array](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/153.%20Find%20Minimum%20in%20Rotated%20Sorted%20Array.md)
[154. Find Minimum in Rotated Sorted Array II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/154.%20Find%20Minimum%20in%20Rotated%20Sorted%20Array%20II.md)
[155. Min Stack](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/155.%20Min%20Stack.md)
[160. Intersection of Two Linked Lists](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/160.%20Intersection%20of%20Two%20Linked%20Lists.md)
[162. Find Peak Element](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/162.%20Find%20Peak%20Element.md)
[164. Maximum Gap](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/164.%20Maximum%20Gap.md)
[165. Compare Version Numbers](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/165.%20Compare%20Version%20Numbers.md)
[166. Fraction to Recurring Decimal](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/166.%20Fraction%20to%20Recurring%20Decimal.md)
[167. Two Sum II - Input array is sorted](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/167.%20Two%20Sum%20II%20-%20Input%20array%20is%20sorted.md)
[168. Excel Sheet Column Title](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/168.%20Excel%20Sheet%20Column%20Title.md)
[169. Majority Element](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/169.%20Majority%20Element.md)
[171. Excel Sheet Column Number](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/171.%20Excel%20Sheet%20Column%20Number.md)
[172. Factorial Trailing Zeroes](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/172.%20Factorial%20Trailing%20Zeroes.md)
[173. Binary Search Tree Iterator](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/173.%20Binary%20Search%20Tree%20Iterator.md)
[174. Dungeon Game](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/174.%20Dungeon%20Game.md)
[175. Combine Two Tables](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/175.%20Combine%20Two%20Tables.md)
[176. Second Highest Salary](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/176.%20Second%20Highest%20Salary.md)
[177. Nth Highest Salary](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/177.%20Nth%20Highest%20Salary.md)
[178. Rank Scores](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/178.%20Rank%20Scores.md)
[179. Largest Number](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/179.%20Largest%20Number.md)
[180. Consecutive Numbers](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/180.%20Consecutive%20Numbers.md)
[181. Employees Earning More Than Their Managers](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/181.%20EmployeesVEarning%20More%20Than%20Their%20Managers.md)
[182. Duplicate Emails](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/182.%20Duplicate%20Emails.md)
[183. Customers Who Never Order](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/183.%20Customers%20Who%20Never%20Order.md)
[184. Department Highest Salary](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/184.%20Department%20Highest%20Salary.md)
[185. Department Top Three Salaries](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/185.%20Department%20Top%20Three%20Salaries.md)
[187. Repeated DNA Sequences](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/187.%20Repeated%20DNA%20Sequences.md)
[189. Rotate Array](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/189.%20Rotate%20Array.md)
[190. Reverse Bits](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/190.%20Reverse%20Bits.md)
[191. Number of 1 Bits](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/191.%20Number%20of%201%20Bits.md)
[198. House Robber](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/198.%20House%20Robber.md)
[199. Binary Tree Right Side View](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/199.%20Binary%20Tree%20Right%20Side%20View.md)
[200. Number of Islands](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/200.%20Number%20of%20Islands.md)
[201. Bitwise AND of Numbers Range](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/201.%20Bitwise%20AND%20ofvNumbers%20Range.md)
[202. Happy Number](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/202.%20Happy%20Number.md)
[203. Remove Linked List Elements](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/203.%20Remove%20Linked%20List%20Elements.md)
[204. Count Primes](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/204.%20Count%20Primes.md)
[205. Isomorphic Strings](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/205.%20Isomorphic%20Strings.md)
[206. Reverse Linked List](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/206.%20Reverse%20Linked%20List.md)
[207. Course Schedule](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/207.%20Course%20Schedule.md)
[208. Implement Trie (Prefix Tree)](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/208.%20Implement%20Trie%20(Prefix%20Tree).md)
[209. Minimum Size Subarray Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/209.%20Minimum%20Size%20Subarray%20Sum.md)
[210. Course Schedule II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/210.%20Course%20Schedule%20II.md)
[211. Add and Search Word - Data structure design](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/211.%20Add%20and%20Search%20Word%20-%20Data%20structure%20design.md)
[212. Word Search II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/212.%20Word%20Search%20II.md)
[213. House Robber II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/213.%20House%20Robber%20II.md)
[214. Shortest Palindrome](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/214.%20Shortest%20Palindrome.md)
[215. Kth Largest Element in an Array](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/215.%20Kth%20Largest%20Element%20in%20an%20Array.md)
[216. Combination Sum III](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/216.%20Combination%20Sum%20III.md)
[217. Contains Duplicate](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/217.%20Contains%20Duplicate.md)
[219. Contains Duplicate II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/219.%20Contains%20Duplicate%20II.md)
[220. Contains Duplicate III](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/220.%20Contains%20Duplicate%20III.md)
[221. Maximal Square](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/221.%20Maximal%20Square.md)
[222. Count Complete Tree Nodes](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/222.%20Count%20Complete%20Tree%20Nodes.md)
[223. Rectangle Area](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/223.%20Rectangle%20Area.md)
[224. Basic Calculator](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/224.%20Basic%20Calculator.md)
[225. Implement Stack using Queues](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/225.%20Implement%20Stack%20using%20Queues.md)
[226. Invert Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/226.%20Invert%20Binary%20Tree.md)
[227. Basic Calculator II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/227.%20Basic%20Calculator%20II.md)
[228. Summary Ranges](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/228.%20Summary%20Ranges.md)
[229. Majority Element II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/229.%20Majority%20Element%20II.md)
[230. Kth Smallest Element in a BST](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/230.%20Kth%20Smallest%20Element%20in%20a%20BST.md)
[231. Power of Two](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/231.%20Power%20of%20Two.md)
[232. Implement Queue using Stacks](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/232.%20Implement%20Queue%20using%20Stacks.md)
[234. Palindrome Linked List](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/234.%20Palindrome%20Linked%20List.md)
[235. Lowest Common Ancestor of a Binary Search Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/235.%20Lowest%20Common%20Ancestor%20of%20a%20Binary%20Search%20Tree.md)
[236. Lowest Common Ancestor of a Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/236.%20Lowest%20Common%20Ancestor%20of%20a%20Binary%20Tree.md)
[237. Delete Node in a Linked List](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/237.%20Delete%20Node%20in%20a%20Linked%20List.md)
[238. Product of Array Except Self](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/238.%20Product%20of%20Array%20Except%20Self.md)
[239. Sliding Window Maximum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/239.%20Sliding%20Window%20Maximum.md)
[240. Search a 2D Matrix II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/240.%20Search%20a%202D%20Matrix%20II.md)
[241. Different Ways to Add Parentheses](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/241.%20Different%20Ways%20to%20Add%20Parentheses.md)
[242. Valid Anagram](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/242.%20Valid%20Anagram.md)
[257. Binary Tree Paths](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/257.%20Binary%20Tree%20Paths.md)
[258. Add Digits](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/258.%20Add%20Digits.md)
[263. Ugly Number](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/263.%20Ugly%20Number.md)
[264. Ugly Number II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/264.%20Ugly%20Number%20II.md)
[268. Missing Number](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/268.%20Missing%20Number.md)
[274. H-Index](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/274.%20H-Index.md)
[275. H-Index II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/275.%20H-Index%20II.md)
[276. Paint Fence](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/276.%20Paint%20Fence.md)
[278. First Bad Version](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/278.%20First%20Bad%20Version.md)
[279. Perfect Squares](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/279.%20Perfect%20Squares.md)
[282. Expression Add Operators](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/282.%20Expression%20Add%20Operators.md)
[283. Move Zeroes](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/283.%20Move%20Zeroes.md)
[284. Peeking Iterator](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/284.%20Peeking%20Iterator.md)
[287. Find the Duplicate Number](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/287.%20Find%20the%20Duplicate%20Number.md)
[289. Game of Life](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/289.%20Game%20of%20Life.md)
[290. Word Pattern](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/290.%20Word%20Pattern.md)
[292. Nim Game](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/292.%20Nim%20Game.md)
[295.Find Median from Data Stream](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/295.Find%20Median%20from%20Data%20Stream.md)
[297. Serialize and Deserialize Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/297.%20Serialize%20and%20Deserialize%20Binary%20Tree.md)
[299. Bulls and Cows](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/299.%20Bulls%20and%20Cows.md)
[300. Longest Increasing Subsequence](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/300.%20Longest%20Increasing%20Subsequence.md)
[301. Remove Invalid Parentheses](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/301.%20Remove%20Invalid%20Parentheses.md)
[303. Range Sum Query - Immutable](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/303.%20Range%20Sum%20Query%20-%20Immutable.md)
[304. Range Sum Query 2D - Immutable](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/304.%20Range%20Sum%20Query%202D%20-%20Immutable.md)
[305. Number Of Island II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/305.%20Number%20Of%20Island%20II.md)
[306. Additive Number](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/306.%20Additive%20Number.md)
[307. Range Sum Query - Mutable](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/307.%20Range%20Sum%20Query%20-%20Mutable.md)
[309. Best Time to Buy and Sell Stock with Cooldown](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/309.%20Best%20Time%20to%20Buy%20and%20Sell%20Stock%20with%20Cooldown.md)
[310. Minimum Height Trees](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/310.%20Minimum%20Height%20Trees.md)
[312. Burst Balloons](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/312.%20Burst%20Balloons.md)
[313. Super Ugly Number](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/313.%20Super%20Ugly%20Number.md)
[315. Count of Smaller Numbers After Self](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/315.%20Count%20of%20Smaller%20Numbers%20After%20Self.md)
## LeetCode by Tag:
1. [Tag table from huahua](https://docs.google.com/spreadsheets/d/1SbpY-04Cz8EWw3A_LBUmDEXKUMO31DBjfeMoA0dlfIA/edit#gid=126913158)
### Advance
#### Trie Tree
* [208. Implement Trie (Prefix Tree)](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/208.%20Implement%20Trie%20(Prefix%20Tree).md)
* [648. Replace Words](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/648.%20Replace%20Words.md)
* [676. Implement Magic Dictionary](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/676.%20Implement%20Magic%20Dictionary.md)
* [677. Map Sum Pairs](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/677.%20Map%20Sum%20Pairs.md)
* [720. Longest Word in Dictionary](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/720.%20Longest%20Word%20in%20Dictionary.md)
* [745. Prefix and Suffix Search](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/745.%20Prefix%20and%20Suffix%20Search.md)
* Conclusion: [Data structure | Trie Tree 字典树](https://seanforfun.github.io/datastructure/2018/11/07/TrieTree.html)
#### BIT / Segment tree
* [307. Range Sum Query - Mutable](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/307.%20Range%20Sum%20Query%20-%20Mutable.md)
* Conclusion: [Data structure | Binary Index Tree](https://seanforfun.github.io/datastructure/2018/03/03/BinaryIndexTree.html)
* Conclusion: [Data structure | Segment Tree](https://seanforfun.github.io/datastructure/2018/03/04/SegmentTree.html)
#### Monotic stack
* [84. Largest Rectangle in Histogram](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/84.%20Largest%20Rectangle%20in%20Histogram.md)
* [85. Maximal Rectangle](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/85.%20Maximal%20Rectangle.md)
* [901. Online Stock Span](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/901.%20Online%20Stock%20Span.md)
* [907. Sum of Subarray Minimums](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/907.%20Sum%20of%20Subarray%20Minimums.md)
### Search
#### Combination
* [17. Letter Combinations of a Phone Number](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/17.%20Letter%20Combinations%20of%20a%20Phone%20Number.md)
* [39. Combination Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/39.%20Combination%20Sum.md)
* [40. Combination Sum II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/40.%20Combination%20Sum%20II.md)
* [77. Combinations](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/77.%20Combinations.md)
* [79. Word Search](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/79.%20Word%20Search.md)
* [90. Subsets II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/90.%20Subsets%20II.md)
* [216. Combination Sum III](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/216.%20Combination%20Sum%20III.md)
* Conclusion: We can speed up the recursion using an index and if we want all elements used once, we need to sort first and in the for loop, we need to remove duplicate values.
#### Permutation
* [46. Permutations](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/46.%20Permutations.md)
* [47. Permutations II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/47.%20Permutations%20II.md)
* [784. Letter Case Permutation](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/784.%20Letter%20Case%20Permutation.md)
* [943. Find the Shortest Superstring](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/943.%20Find%20the%20Shortest%20Superstring.md)
* [996. Number of Squareful Arrays](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/996.%20Number%20of%20Squareful%20Arrays.md)
#### DFS
* [22. Generate Parentheses](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/22.%20Generate%20Parentheses.md)
* [301. Remove Invalid Parentheses](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/301.%20Remove%20Invalid%20Parentheses.md)
* [37. Sudoku Solver](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/37.%20Sudoku%20Solver.md)
* [51. N-Queens](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/51.%20N-Queens.md)
* [52. N-Queens II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/52.%20N-Queens%20II.md)
* [79. Word Search](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/79.%20Word%20Search.md)
* [212. Word Search II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/212.%20Word%20Search%20II.md)
#### BFS
* [127. Word Ladder](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/127.%20Word%20Ladder.md)
* [126. Word Ladder II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/126.%20Word%20Ladder%20II.md)
* [752. Open the Lock](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/752.%20Open%20the%20Lock.md)
* [542. 01 Matrix](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/542.%200120Matrix.md)
* [695. Max Area of Island](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/695.%20Max%20Area%20of%20Island.md)
* [934. Shortest Bridge](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/934.%20Shortest%20Bridge.md)
#### Partition
* [698. Partition to K Equal Sum Subsets](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/698.%20Partition%20to%20K%20Equal%20Sum%20Subsets.md)
* [93. Restore IP Addresses](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/93.%20Restore%20IP%20Addresses.md)
* [131. Palindrome Partitioning](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/131.%20Palindrome%20Partitioning.md)
* [241. Different Ways to Add Parentheses](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/241.%20Different%20Ways%20to%20Add%20Parentheses.md)
* [282. Expression Add Operators](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/282.%20Expression%20Add%20Operators.md)
* [842. Split Array into Fibonacci Sequence](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/842.%20Split%20Array%20into%20Fibonacci%20Sequence.md)
#### Dynamic Programming
* [70. Climbing Stairs](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/70.%20Climbing%20Stairs.md)
* [746. Min Cost Climbing Stairs](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/746.%20Min%20Cost%20Climbing%20Stairs.md)
* [303. Range Sum Query - Immutable](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/303.%20Range%20Sum%20Query%20-%20Immutable.md)
* [53. Maximum Subarray](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/53.%20Maximum%20Subarray.md)
* [121. Best Time to Buy and Sell Stock](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/121.%20Best%20Time%20to%20Buy%20and%20Sell%20Stock.md)
* [198. House Robber](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/198.%20House%20Robber.md)
* [213. House Robber II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/213.%20House%20Robber%20II.md)
* [309. Best Time to Buy and Sell Stock with Cooldown](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/309.%20Best%20Time%20to%20Buy%20and%20Sell%20Stock%20with%20Cooldown.md)
* [740. Delete and Earn](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/740.%20Delete%20and%20Earn.md)
* [790. Domino and Tromino Tiling](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/790.%20Domino%20and%20Tromino%20Tiling.md)
* [801. Minimum Swaps To Make Sequences Increasing](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/801.%20Minimum%20Swaps%20To%20Make%20Sequences%20Increasing.md)
* [139. Word Break](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/139.%20Word%20Break.md)
* [140. Word Break II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/140.%20Word%20Break%20II.md)
* [818. Race Car](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/818.%20Race%20Car.md)
* [300. Longest Increasing Subsequence](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/300.%20Longest%20Increasing%20Subsequence.md)
* [673. Number of Longest Increasing Subsequence](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/673.%20Number%20of%20Longest%20Increasing%20Subsequence.md)
* [72. Edit Distance](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/72.%20Edit%20Distance.md)
* [10. Regular Expression Matching](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/10.%20Regular%20Expression%20Matching.md)
* [44. Wildcard Matching](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/44.%20Wildcard%20Matching.md)
* [97. Interleaving String](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/97.%20Interleaving%20String.md)
* [115. Distinct Subsequences](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/115.%20Distinct%20Subsequences.md)
* [583. Delete Operation for Two Strings](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/583.%20Delete%20Operation%20for%20Two%20Strings.md)
* [712. Minimum ASCII Delete Sum for Two Strings](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/712.%20Minimum%20ASCII%20Delete%20Sum%20for%20Two%20Strings.md)
* [322. Coin Change](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/322.%20Coin%20Change.md)
* [377. Combination Sum IV](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/377.%20Combination%20Sum%20IV.md)
* [416. Partition Equal Subset Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/416.%20Partition%20Equal%20Subset%20Sum.md)
* [494. Target Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/494.%20Target%20Sum.md)
* [813. Largest Sum of Averages](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/813.%20Largest%20Sum%20of%20Averages.md)
* [312. Burst Balloons](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/312.%20Burst%20Balloons.md)
* [664. Strange Printer](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/664.%20Strange%20Printer.md)
* [741. Cherry Pickup](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/741.%20Cherry%20Pickup.md)
* [546. Remove Boxes](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/546.%20Remove%20Boxes.md)
* [943. Find the Shortest Superstring](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/943.%20Find%20the%20Shortest%20Superstring.md)
* [980. Unique Paths III](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/980.%20Unique%20Paths%20III.md)
* [996. Number of Squareful Arrays](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/996.%20Number%20of%20Squareful%20Arrays.md)
* [62. Unique Paths](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/62.%20Unique%20Paths.md)
* [63. Unique Paths II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/63.%20Unique%20Paths%20II.md)
* [64. Minimum Path Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/64.%20Minimum%20Path%20Sum.md)
* [120. Triangle](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/120.%20Triangle.md)
* [174. Dungeon Game](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/174.%20Dungeon20Game.md)
* [931. Minimum Falling Path Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/931.%20Minimum%20Falling%20Path%20Sum.md)
* [85. Maximal Rectangle](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/85.%20Maximal%20Rectangle.md)
* [221. Maximal Square](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/221.%20Maximal%20Square.md)
* [304. Range Sum Query 2D - Immutable](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/304.%20Range%20Sum%20Query%202D%20-%20Immutable.md)
* [688. Knight Probability in Chessboard](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/688.%20Knight%20Probability%20in%20Chessboard.md)
* [576. Out of Boundary Paths](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/576.%20Out%20of%20Boundary%20Paths.md)
* [935. Knight Dialer](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/935.%20Knight%20Dialer.md)
### Graph
#### Clone graph: hashtable + dfs
* [133. Clone Graph](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/133.%20Clone%20Graph.md)
* [138. Copy List with Random Pointer](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/138.%20Copy%20List%20with%20Random%20Pointer.md)
#### Grid + Connected Component
* [200. Number of Islands](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/200.%20Number%20of%20Islands.md)
* [547. Friend Circles](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/547.%20Friend%20Circles.md)
* [695. Max Area of Island](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/695.%20Max%20Area%20of%20Island.md)
* [733. Flood Fill](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/733.%20Flood%20Fill.md)
* [827. Making A Large Island](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/827.%20Making%20A%20Large%20Island.md)
* [841. Keys and Rooms](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/841.%20Keys%20and%20Rooms.md)
#### Topological Sort
* [207. Course Schedule](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/207.%20Course%20Schedule.md)
* [210. Course Schedule II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/210.%20Course%20Schedule%20II.md)
* [802. Find Eventual Safe States](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/802.%20Find%20Eventual%20Safe%20States.md)
#### Union Find Set / Disjoint Set
* [399. Evaluate Division](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/399.%20Evaluate%20Division.md)
* [839. Similar String Groups](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/839.%20Similar%20String%20Groups.md)
* [952. Largest Component Size by Common Factor](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/952.%20Largest%20Component%20Size%20by%20Common%20Factor.md)
* [990. Satisfiability of Equality Equations](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/990.%20Satisfiability%20of%20Equality%20Equations.md)
* [721. Accounts Merge](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/721.%20Accounts%20Merge.md)
#### Bipartite
* [785. Is Graph Bipartite?](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/785.%20Is%20Graph%20Bipartite?.md)
* [886. Possible Bipartition](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/886.%20Possible%20Bipartition.md)
#### Cycle+Union-find
* [684. Redundant Connection](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/684.%20Redundant%20Connection.md)
* [685. Redundant Connection II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/685.%20Redundant%20Connection%20II.md)
* [787. Cheapest Flights Within K Stops](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/787.%20Cheapest%20Flights%20Within%20K%20Stops.md)
#### Shortest Path
* [743. Network Delay Time](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/743.%20Network%20Delay%20Time.md)
#### BFS
* [847. Shortest Path Visiting All Nodes](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/847.%20Shortest%20Path%20Visiting%20All%20Nodes.md)
* [815. Bus Routes](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/815.%20Bus%20Routes.md)
* [864. Shortest Path to Get All Keys](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/864.%20Shortest%20Path%20to%20Get%20All%20Keys.md)
* [924. Minimize Malware Spread](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/924.%20Minimize%20Malware%20Spread.md)
#### Hamilton Path / DP
* [943. Find the Shortest Superstring](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/943.%20Find%20the%20Shortest%20Superstring.md)
* [980. Unique Paths III](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/980.%20Unique%20Paths%20III.md)
* [996. Number of Squareful Arrays](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/996.%20Number%20of%20Squareful%20Arrays.md)
#### Union-find + connected component
* [959. Regions Cut By Slashes](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/959.%20Regions%20Cut%20By%20Slashes.md)
### Tree
#### Traversal
* [94. Binary Tree Inorder Traversal](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/94.%20Binary%20Tree%20Inorder%20Traversal.md)
* [589. N-ary Tree Preorder Traversal](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/589.%20N-ary%20Tree%20Preorder%20Traversal.md)
* [590. N-ary Tree Postorder Traversal](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/590.%20N-ary%20Tree%20Postorder%20Traversal.md)
* [100. Same Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/100.%20Same%20Tree.md)
* [101. Symmetric Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/101.%20Symmetric%20Tree.md)
* [104. Maximum Depth of Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/104.%20Maximum%20Depth%20of%20Binary%20Tree.md)
* [110. Balanced Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/110.%20Balanced%20Binary%20Tree.md)
* [111. Minimum Depth of Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/111.%20Minimum%20Depth%20of%20Binary%20Tree.md)
* [572. Subtree of Another Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/572.%20Subtree%20of%20Another%20Tree.md)
* [965. Univalued Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/965.%20Univalued%20Binary%20Tree.md)
#### Collecting Node
* [102. Binary Tree Level Order Traversal](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/102.%20Binary%20Tree%20Level%20Order%20Traversal.md)
* [107. Binary Tree Level Order Traversal II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/107.%20Binary%20Tree%20Level%20Order%20Traversal%20II.md)
* [429. N-ary Tree Level Order Traversal](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/429.%20N-ary%20Tree%20Level%20Order%20Traversal.md)
* [987. Vertical Order Traversal of a Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/987.%20Vertical%20Order%20Traversal%20of%20a%20Binary%20Tree.md)
* [814. Binary Tree Pruning](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/814.%20Binary%20Tree%20Pruning.md)
* [669. Trim a Binary Search Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/669.%20Trim%20a%20Binary%20Search%20Tree.md)
* [112. Path Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/112.%20Path%20Sum.md)
* [113. Path Sum II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/113.%20Path%20Sum%20II.md)
* [437. Path Sum III](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/437.%20Path%20Sum%20III.md)
#### Use both nodes, return one.
* [124. Binary Tree Maximum Path Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/124.%20Binary%20Tree%20Maximum%20Path%20Sum.md)
* [543. Diameter of Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/543.%20Diameter%20of%20Binary%20Tree.md)
* [687. Longest Univalue Path](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/687.%20Longest%20Univalue%20Path.md)
* [129. Sum Root to Leaf Numbers](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/129.%20Sum%20Root%20to%20Leaf%20Numbers.md)
* [257. Binary Tree Paths](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/257.%20Binary%20Tree%20Paths.md)
* [235. Lowest Common Ancestor of a Binary Search Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/235.%20Lowest%20Common%20Ancestor%20of%20a%20Binary%20Search%20Tree.md)
* [236. Lowest Common Ancestor of a Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/236.%20Lowest%20Common%20Ancestor%20of%20a%20Binary%20Tree.md)
* [297. Serialize and Deserialize Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/297.%20Serialize%20and%20Deserialize%20Binary%20Tree.md)
* [449. Serialize and Deserialize BST](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/449.%20Serialize%20and%20Deserialize%20BST.md)
* [508. Most Frequent Subtree Sum](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/508.%20Most%20Frequent%20Subtree%20Sum.md)
* [968. Binary Tree Cameras](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/968.%20Binary%20Tree%20Cameras.md)
* [337. House Robber III](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/337.%20House%20Robber%20III.md)
* [979. Distribute Coins in Binary Tree](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/979.%20Distribute%20Coins%20in%20Binary%20Tree.md)
### Binary Search
* [34. Find First and Last Position of Element in Sorted Array](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/34.%20Find%20First%20and%20Last%20Position%20of%20Element%20in%20Sorted%20Array.md)
* [35. Search Insert Position](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/35.%20Search%20Insert%20Position.md)
* [704. Binary Search](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/704.%20Binary%20Search.md)
* [981. Time Based Key-Value Store](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/981.%20Time%20Based%20Key-Value%20Store.md)
* [33. Search in Rotated Sorted Array](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/33.%20Search%20in%20Rotated%20Sorted%20Array.md)
* [81. Search in Rotated Sorted Array II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/81.%20Search%20in%20Rotated%20Sorted%20Array%20II.md)
* [153. Find Minimum in Rotated Sorted Array](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/153.%20Find%20Minimum%20in%20Rotated%20Sorted%20Array.md)
* [154. Find Minimum in Rotated Sorted Array II](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/154.%20Find%20Minimum%20in%20Rotated%20Sorted%20Array%20II.md)
* [162. Find Peak Element](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/162.%20Find%20Peak%20Element.md)
* [852. Peak Index in a Mountain Array](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/852.%20Peak%20Index%20in%20a%20Mountain%20Array.md)
* [69. Sqrt(x)](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/69.%20Sqrt(x).md)
* [74. Search a 2D Matrix](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/74.%20Search%20a%202D%20Matrix.md)
* [378. Kth Smallest Element in a Sorted Matrix](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/378.%20Kth%20Smallest%20Element%20in%20a%20Sorted%20Matrix.md)
* [668. Kth Smallest Number in Multiplication Table](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/668.%20Kth%20Smallest%20Number%20in%20Multiplication%20Table.md)
* [778. Swim in Rising Water](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/778.%20Swim%20in%20Rising%20Water.md)
* [174. Dungeon Game](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/174.%20Dungeon%20Game.md)
* [875. Koko Eating Bananas](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/875.%20Koko%20Eating%20Bananas.md)
* [4.Median of Two Sorted Arrays](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/4.%20Median%20of%20Two%20Sorted%20Arrays.md)
* [719. Find K-th Smallest Pair Distance](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/719.%20Find%20K-th%20Smallest%20Pair%20Distance.md)
* [786. K-th Smallest Prime Fraction](https://github.com/Seanforfun/Algorithm-and-Leetcode/blob/master/leetcode/786.%20K-th%20Smallest%20Prime%20Fraction.md)
## Algorithm(4th_Edition)
Reading notes of book Algorithm(4th Algorithm),ISBN: 9787115293800.
All java realization codes are placed in different packages.
### [Sorting](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Sort/Sort.md)
* [Selection](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Sort/SelectionSort.md)
* [Insertion](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Sort/InsertionSort.md)
* [Merge](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Sort/MergeSort.md)
* [QuickSort](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Sort/QuickSort.md)
* [CountSort](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Sort/CountSort.md)
* [BucketSort](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Sort/BucketSort.md)
### Search
* [BinarySearch](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Search/BinarySearch.md)
## Data Structure
I started learning the data struture systematically, I will list my notes in the order that I read the book.
### [Tree](https://github.com/Seanforfun/Algorithm/tree/master/DataStructrue/Tree)
1. [Binary Tree](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Tree/%E4%BA%8C%E5%8F%89%E6%A0%91BinaryTree.md)
2. [Complete Binary Tree](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Tree/%E5%AE%8C%E5%85%A8%E4%BA%8C%E5%8F%89%E6%A0%91CompleteBinaryTree.md)
3. [Balanced Binary Tree](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Tree/%E5%B9%B3%E8%A1%A1%E4%BA%8C%E5%8F%89%E6%A0%91BalancedBinaryTree.md)
4. [Black Red Tree](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Tree/%E7%BA%A2%E9%BB%91%E6%A0%91BlackRedTree.md)
5. [B Tree series](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Tree/B%E6%A0%91%E7%B3%BB%E5%88%97.md)
### [Queue](https://github.com/Seanforfun/Algorithm/tree/master/DataStructrue/Queue)
* Blocking Queue
1. [Array Blocking Queue](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Queue/ArrayBlockingQueue.md)
2. [Linked Blocking Queue](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Queue/LinkedBlockingQueue.md)
3. [Priority Blocking Queue](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Queue/PriorityBlockingQueue.md)
4. [Delay Queue](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Queue/DelayQueue.md)
* Non Blocking Queue
1. [ConcurrentLinkedQueue](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Queue/ConcurrentLinkedQueue.md)
### [Map](https://github.com/Seanforfun/Algorithm/tree/master/DataStructrue/Map)
1. [HashMap](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Map/HashMap.md)
2. [ConcurrentHashMap](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Map/ConcurrentHashMap.md)
### [Graph](https://github.com/Seanforfun/Algorithm/tree/master/DataStructrue/Graph)
1. [Undirected Graph](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Graph/UndirectedGraph.md)
2. [Directed Graph](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Graph/DirectedGraph.md)
3. [Minimun Spanning Trees](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Graph/MinimumSpanningTrees.md)
4. [Shortest Path](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Graph/ShortestPath.md)
### [Union-find](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/Graph/UnionFind.md)
### [String](https://github.com/Seanforfun/Algorithm/tree/master/DataStructrue/String)
1. [Trie Tree](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/String/TrieTree.md)
2. [KMP](https://github.com/Seanforfun/Algorithm/blob/master/DataStructrue/String/kmp.md)
## [Cracking the code interview](https://github.com/Seanforfun/Algorithm/tree/master/leetcode/Offer)
1. Array and String. (Question1_*)
2. List. (Question2_*)
3. Stack and Queue. (Question3_*)
4. Tree and Graph. (Question4_*)
5. Bit Operations. (Question5_*)
9. Recursive and Dynamic programming. (Question9_*)