File tree Expand file tree Collapse file tree 5 files changed +73
-0
lines changed
Expand file tree Collapse file tree 5 files changed +73
-0
lines changed Original file line number Diff line number Diff line change @@ -370,3 +370,22 @@ var search = function (nums, target) {
370370};
371371```
372372
373+ ## 总结
374+
375+ 二分搜索核心四点要素(必背&理解)
376+
377+ - 1、初始化:start=0、end=len-1
378+ - 2、循环退出条件:start + 1 < end
379+ - 3、比较中点和目标值:A[ mid] ==、 <、> target
380+ - 4、判断最后两个元素是否符合:A[ start] 、A[ end] ? target
381+
382+ ## 练习题
383+
384+ - [ search-for-range] ( https://www.lintcode.com/problem/search-for-a-range/description )
385+ - [ search-insert-position] ( https://leetcode-cn.com/problems/search-insert-position/ )
386+ - [ search-a-2d-matrix] ( https://leetcode-cn.com/problems/search-a-2d-matrix/ )
387+ - [ first-bad-version] ( https://leetcode-cn.com/problems/first-bad-version/ )
388+ - [ find-minimum-in-rotated-sorted-array] ( https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array/ )
389+ - [ find-minimum-in-rotated-sorted-array-ii] ( https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array-ii/ )
390+ - [ search-in-rotated-sorted-array] ( https://leetcode-cn.com/problems/search-in-rotated-sorted-array/ )
391+ - [ search-in-rotated-sorted-array-ii] ( https://leetcode-cn.com/problems/search-in-rotated-sorted-array-ii/ )
Original file line number Diff line number Diff line change @@ -449,3 +449,31 @@ function backpack(m: number, A: number[]): number {
449449}
450450```
451451
452+ ## 练习
453+
454+ Matrix DP (10%)
455+
456+ - [ triangle] ( https://leetcode-cn.com/problems/triangle/ )
457+ - [ minimum-path-sum] ( https://leetcode-cn.com/problems/minimum-path-sum/ )
458+ - [ unique-paths] ( https://leetcode-cn.com/problems/unique-paths/ )
459+ - [ unique-paths-ii] ( https://leetcode-cn.com/problems/unique-paths-ii/ )
460+
461+ Sequence (40%)
462+
463+ - [ climbing-stairs] ( https://leetcode-cn.com/problems/climbing-stairs/ )
464+ - [ jump-game] ( https://leetcode-cn.com/problems/jump-game/ )
465+ - [ jump-game-ii] ( https://leetcode-cn.com/problems/jump-game-ii/ )
466+ - [ palindrome-partitioning-ii] ( https://leetcode-cn.com/problems/palindrome-partitioning-ii/ )
467+ - [ longest-increasing-subsequence] ( https://leetcode-cn.com/problems/longest-increasing-subsequence/ )
468+ - [ word-break] ( https://leetcode-cn.com/problems/word-break/ )
469+
470+ Two Sequences DP (40%)
471+
472+ - [ longest-common-subsequence] ( https://leetcode-cn.com/problems/longest-common-subsequence/ )
473+ - [ edit-distance] ( https://leetcode-cn.com/problems/edit-distance/ )
474+
475+ Backpack & Coin Change (10%)
476+
477+ - [ coin-change] ( https://leetcode-cn.com/problems/coin-change/ )
478+ - [ backpack] ( https://www.lintcode.com/problem/backpack/description )
479+ - [ backpack-ii] ( https://www.lintcode.com/problem/backpack-ii/description )
Original file line number Diff line number Diff line change 1+ ## 排序算法
2+
13#### 快速排序
24
35``` js
Original file line number Diff line number Diff line change @@ -475,3 +475,20 @@ var insertIntoBST = function (root, val) {
475475};
476476```
477477
478+ ## 总结
479+
480+ - 掌握二叉树递归与非递归遍历
481+ - 理解 DFS 前序遍历与分治法
482+ - 理解 BFS 层次遍历
483+
484+ ## 练习
485+
486+ - [ maximum-depth-of-binary-tree] ( https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/ )
487+ - [ balanced-binary-tree] ( https://leetcode-cn.com/problems/balanced-binary-tree/ )
488+ - [ binary-tree-maximum-path-sum] ( https://leetcode-cn.com/problems/binary-tree-maximum-path-sum/ )
489+ - [ lowest-common-ancestor-of-a-binary-tree] ( https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/ )
490+ - [ binary-tree-level-order-traversal] ( https://leetcode-cn.com/problems/binary-tree-level-order-traversal/ )
491+ - [ binary-tree-level-order-traversal-ii] ( https://leetcode-cn.com/problems/binary-tree-level-order-traversal-ii/ )
492+ - [ binary-tree-zigzag-level-order-traversal] ( https://leetcode-cn.com/problems/binary-tree-zigzag-level-order-traversal/ )
493+ - [ validate-binary-search-tree] ( https://leetcode-cn.com/problems/validate-binary-search-tree/ )
494+ - [ insert-into-a-binary-search-tree] ( https://leetcode-cn.com/problems/insert-into-a-binary-search-tree/ )
Original file line number Diff line number Diff line change @@ -105,3 +105,10 @@ function fib(n: number): number {
105105};
106106```
107107
108+ ## 练习
109+
110+ - [ reverse-string] ( https://leetcode-cn.com/problems/reverse-string/ )
111+ - [ swap-nodes-in-pairs] ( https://leetcode-cn.com/problems/swap-nodes-in-pairs/ )
112+ - [ unique-binary-search-trees-ii] ( https://leetcode-cn.com/problems/unique-binary-search-trees-ii/ )
113+ - [ fibonacci-number] ( https://leetcode-cn.com/problems/fibonacci-number/ )
114+
You can’t perform that action at this time.
0 commit comments