Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4e1acbf

Browse files
committed
update doc
1 parent3271866 commit4e1acbf

File tree

6 files changed

+86
-49
lines changed

6 files changed

+86
-49
lines changed

‎README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ P.S.:
117117
| 077|[Combinations](https://github.com/interviewcoder/leetcode/blob/master/src/_077_Combinations/Solution.java)| Medium|`Backtracking`||
118118
| 078|[Subsets](https://github.com/interviewcoder/leetcode/blob/master/src/_078_Subsets/Solution.java)| Medium|`Array``Backtracking``Bit Manipulation`| backtrack template (see[README](https://github.com/interviewcoder/leetcode/blob/master/src/_078_Subsets))|
119119
| 079|[Word Search](https://github.com/interviewcoder/leetcode/blob/master/src/_079_WordSearch/Solution.java)| Medium|`Array``Backtracking`||
120-
| 080|[Remove Duplicates from Sorted Array II](https://github.com/interviewcoder/leetcode/blob/master/src/_080_RemoveDuplicatesFromSortedArrayII/Solution.java)| Medium|`Array``Two Pointers`||
120+
| 080|[Remove Duplicates from Sorted Array II](https://github.com/interviewcoder/leetcode/blob/master/src/_080_RemoveDuplicatesFromSortedArrayII/)| Medium|`Array``Two Pointers`| from 2 to k (general)|
121121
| 081|[Search in Rotated Sorted Array II](https://github.com/interviewcoder/leetcode/blob/master/src/_081_SearchInRotatedSortedArrayII/Solution.java)| Medium|`Array``Binary Search`||
122122
| 082|[Remove Duplicates from Sorted List II](https://github.com/interviewcoder/leetcode/blob/master/src/_082_RemoveDuplicatesFromSortedListII/Solution.java)| Medium|`Linked List`||
123123
| 083|[Remove Duplicates from Sorted List](https://github.com/interviewcoder/leetcode/blob/master/src/_083_RemoveDuplicatesFromSortedList/Solution.java)| Easy|`Linked List`||
@@ -135,13 +135,13 @@ P.S.:
135135
| 095|[Unique Binary Search Trees II](https://github.com/interviewcoder/leetcode/blob/master/src/_095_UniqueBinarySearchTreesII/Solution.java)| Medium|`Tree``Dynamic Programming`||
136136
| 096|[Unique Binary Search Trees](https://github.com/interviewcoder/leetcode/blob/master/src/_096_UniqueBinarySearchTrees/Solution.java)| Medium|`Tree``Dynamic Programming`||
137137
| 097|[Interleaving String](https://github.com/interviewcoder/leetcode/blob/master/src/_097_InterleavingString/Solution.java)| Hard|`Dynamic Programming``String`||
138-
| 098|[Validate Binary Search Tree](https://github.com/interviewcoder/leetcode/blob/master/src/_098_ValidateBinarySearchTree/Solution.java)| Medium|`Tree``Depth-first Search`||
139-
| 099|[Recover Binary Search Tree](https://github.com/interviewcoder/leetcode/blob/master/src/_099_RecoverBinarySearchTree/Solution.java)| Hard|`Tree``Depth-first Search`||
138+
| 098|[Validate Binary Search Tree](https://github.com/interviewcoder/leetcode/blob/master/src/_098_ValidateBinarySearchTree/)| Medium|`Tree``Depth-first Search`||
139+
| 099|[Recover Binary Search Tree](https://github.com/interviewcoder/leetcode/blob/master/src/_099_RecoverBinarySearchTree/)| Hard|`Tree``Depth-first Search`||
140140
| 100|[Same Tree](https://github.com/interviewcoder/leetcode/blob/master/src/_100_SameTree/Solution.java)| Easy|`Tree``Depth-first Search`||
141141
| 101|[Symmetric Tree](https://github.com/interviewcoder/leetcode/blob/master/src/_101_SymmetricTree/Solution.java)| Easy|`Tree``Depth-first Search`||
142142
| 102|[Binary Tree Level Order Traversal](https://github.com/interviewcoder/leetcode/blob/master/src/_102_BinaryTreeLevelOrderTraversal/Solution.java)| Easy|`Tree``Breadth-first Search`||
143143
| 103|[Binary Tree Zigzag Level Order Traversal](https://github.com/interviewcoder/leetcode/blob/master/src/_103_BinaryTreeZigzagLevelOrderTraversal/Solution.java)| Medium|`Tree``Breadth-first Search``Stack`||
144-
| 104|[Maximum Depth of Binary Tree](https://github.com/interviewcoder/leetcode/blob/master/src/_104_MaximumDepthOfBinaryTree/Solution.java)| Easy|`Tree``Depth-first Search`||
144+
| 104|[Maximum Depth of Binary Tree](https://github.com/interviewcoder/leetcode/blob/master/src/_104_MaximumDepthOfBinaryTree/)| Easy|`Tree``Depth-first Search`||
145145
| 105|[Construct Binary Tree from Preorder and Inorder Traversal](https://github.com/interviewcoder/leetcode/blob/master/src/_105_ConstructBinaryTreeFromPreorderAndInorderTraversal/Solution.java)| Medium|`Tree``Array``Depth-first Search`||
146146
| 106|[Construct Binary Tree from Inorder and Postorder Traversal](https://github.com/interviewcoder/leetcode/blob/master/src/_106_ConstructBinaryTreeFromInorderAndPostorderTraversal/Solution.java)| Medium|`Tree``Array``Depth-first Search`||
147147
| 107|[Binary Tree Level Order Traversal II](https://github.com/interviewcoder/leetcode/blob/master/src/_107_BinaryTreeLevelOrderTraversalII/Solution.java)| Easy|`Tree``Breadth-first Search`||
@@ -161,7 +161,7 @@ P.S.:
161161
| 121|[Best Time to Buy and Sell Stock](https://github.com/interviewcoder/leetcode/blob/master/src/_121_BestTimeToBuyAndSellStock/Solution.java)| Medium|`Array``Dynamic Programming`||
162162
| 122|[Best Time to Buy and Sell Stock II](https://github.com/interviewcoder/leetcode/blob/master/src/_122_BestTimeToBuyAndSellStockII/Solution.java)| Medium|`Array``Greedy`||
163163
| 123|[Best Time to Buy and Sell Stock III](https://github.com/interviewcoder/leetcode/blob/master/src/_123_BestTimeToBuyAndSellStockIII/Solution.java)| Hard|`Array``Dynamic Programming`||
164-
| 124|[Binary Tree Maximum Path Sum](https://github.com/interviewcoder/leetcode/blob/master/src/_124_BinaryTreeMaximumPathSum/Solution.java)| Hard|`Tree``Depth-first Search`| post-order, local and global ,[README](https://github.com/interviewcoder/leetcode/tree/master/src/_124_BinaryTreeMaximumPathSum)|
164+
| 124|[Binary Tree Maximum Path Sum](https://github.com/interviewcoder/leetcode/blob/master/src/_124_BinaryTreeMaximumPathSum/)| Hard|`Tree``Depth-first Search`| post-order, local and global ,[README](https://github.com/interviewcoder/leetcode/tree/master/src/_124_BinaryTreeMaximumPathSum)|
165165
| 125|[Valid Palindrome](https://github.com/interviewcoder/leetcode/blob/master/src/_125_ValidPalindrome/Solution.java)| Easy|`Two Pointers``String`||
166166
| 126|[Word Ladder II](https://github.com/interviewcoder/leetcode/blob/master/src/_126_WordLadderII/Solution.java)| Hard|`Array``Backtracking``Breadth-first Search``String`||
167167
| 127|[Word Ladder](https://github.com/interviewcoder/leetcode/blob/master/src/_127_WordLadder/Solution.java)| Medium|`Breadth-first Search`||
@@ -181,7 +181,7 @@ P.S.:
181181
| 141|[Linked List Cycle](https://github.com/interviewcoder/leetcode/blob/master/src/_141_LinkedListCycle/Solution.java)| Medium|`Linked List``Two Pointers`||
182182
| 142|[Linked List Cycle II](https://github.com/interviewcoder/leetcode/blob/master/src/_142_LinkedListCycleII/Solution.java)| Medium|`Linked List``Two Pointers`||
183183
| 143|[Reorder List](https://github.com/interviewcoder/leetcode/blob/master/src/_143_ReorderList/Solution.java)| Medium|`Linked List`||
184-
| 144|[Binary Tree Preorder Traversal](https://github.com/interviewcoder/leetcode/blob/master/src/_144_BinaryTreePreorderTraversal/Solution.java)| Medium|`Tree``Stack`||
184+
| 144|[Binary Tree Preorder Traversal](https://github.com/interviewcoder/leetcode/blob/master/src/_144_BinaryTreePreorderTraversal/)| Medium|`Tree``Stack`||
185185
| 145|[Binary Tree Postorder Traversal](https://github.com/interviewcoder/leetcode/blob/master/src/_145_BinaryTreePostorderTraversal/Solution.java)| Hard|`Tree``Stack`||
186186
| 146|[LRU Cache](https://github.com/interviewcoder/leetcode/blob/master/src/_146_LRUCache/Solution.java)| Hard|`Data Structure`||
187187
| 147|[Insertion Sort List](https://github.com/interviewcoder/leetcode/blob/master/src/_147_InsertionSortList/Solution.java)| Medium|`Linked List``Sort`||
@@ -252,7 +252,7 @@ P.S.:
252252
| 233| Number of Digit One| Medium|`Math`||
253253
| 234| Palindrome Linked List| Easy|`Linked List``Two Pointers`||
254254
| 235|[Lowest Common Ancestor of a Binary Search Tree](https://github.com/interviewcoder/leetcode/blob/master/src/_235_LowestCommonAncestorOfABinarySearchTree/Solution.java)| Easy|`Tree`||
255-
| 236|[Lowest Common Ancestor of a Binary Tree](https://github.com/interviewcoder/leetcode/blob/master/src/_236_LowestCommonAncestorOfABinaryTree/Solution.java)| Medium|`Tree`|[README](https://github.com/interviewcoder/leetcode/tree/master/src/_236_LowestCommonAncestorOfABinaryTree)|
255+
| 236|[Lowest Common Ancestor of a Binary Tree](https://github.com/interviewcoder/leetcode/blob/master/src/_236_LowestCommonAncestorOfABinaryTree/)| Medium|`Tree`|[README](https://github.com/interviewcoder/leetcode/tree/master/src/_236_LowestCommonAncestorOfABinaryTree)|
256256
| 237|[Delete Node in a Linked List](https://github.com/interviewcoder/leetcode/blob/master/src/_237_DeleteNodeInALinkedList/Solution.java)| Easy|`Linked List`||
257257
| 238|[Product of Array Except Self](https://github.com/interviewcoder/leetcode/blob/master/src/_238_ProductOfArrayExceptSelf/Solution.java)| Medium|`Array`||
258258
| 239|[Sliding Window Maximum](https://github.com/interviewcoder/leetcode/blob/master/src/_239_SlidingWindowMaximum/Solution.java)| Hard|`Heap`| descending queue|

‎doc/README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@
33
1.[DFS/Backtracking](https://github.com/interviewcoder/leetcode/blob/master/doc/category_dfs.md)
44
- Backtracking:`template``skip duplicates``prune siblings`
55

6-
2.[Dynamic Programming](https://github.com/interviewcoder/leetcode/blob/master/doc/category_dp.md)
7-
-`1D``2 sequences``2D matrix` ->`min/max`/`count`/`boolean`
6+
0.[Dynamic Programming](https://github.com/interviewcoder/leetcode/blob/master/doc/category_dp.md)
7+
- 1D: 1 sequence -> boolean/min/max/count
8+
- 1D: 2 sequences -> boolean/min/max/count
9+
- 2D matrix -> boolean/min/max/count
10+
- other -> boolean/min/max/count
811

9-
3.[Large Scale Data](https://github.com/interviewcoder/leetcode/blob/master/doc/category_largescale.md)
12+
0.[Large Scale Data](https://github.com/interviewcoder/leetcode/blob/master/doc/category_largescale.md)
1013

11-
4.[Monotonic Stack](https://github.com/interviewcoder/leetcode/blob/master/doc/category_monotonicstack.md)
14+
0.[Monotonic Stack](https://github.com/interviewcoder/leetcode/blob/master/doc/category_monotonicstack.md)
1215

13-
5.[Linked List](https://github.com/interviewcoder/leetcode/blob/master/doc/category_linkedlist.md)
16+
0.[Linked List](https://github.com/interviewcoder/leetcode/blob/master/doc/category_linkedlist.md)
1417
-`dummy head``re-connect`
1518

16-
6.[Tree/Trie](https://github.com/interviewcoder/leetcode/blob/master/doc/category_tree.md)
19+
0.[Tree/Trie](https://github.com/interviewcoder/leetcode/blob/master/doc/category_tree.md)
1720

21+
0.[Partition](https://github.com/interviewcoder/leetcode/blob/master/doc/category_partition.md)
22+
23+
0.[Subarray Problem](https://github.com/interviewcoder/leetcode/blob/master/doc/category_subarray.md)

‎doc/category_dp.md

Lines changed: 50 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,51 @@
11
####Category : : Dynamic Programming
2-
| Type| #| Description| Note|
3-
| ---------------------:|:---:| :-----:| :---|
4-
| 1 sequence : boolean(*)| 139|[Word Break](https://github.com/interviewcoder/leetcode/tree/master/src/_139_WordBreak)||
5-
| 1 sequence :`max`/min(*)| 198| House Robber||
6-
| 1 sequence :`max`/min(*)| 213|[House Robber II](https://github.com/interviewcoder/leetcode/tree/master/src/_213_HouseRobberII)||
7-
| 1 sequence :`max`/min(*)| 053|[Maximum Subarray](https://github.com/interviewcoder/leetcode/tree/master/src/_053_MaximumSubarray)||
8-
| 1 sequence :`max`/min(*)| 152|[Maximum Product Subarray](https://github.com/interviewcoder/leetcode/blob/master/src/_152_MaximumProductSubarray/Solution.java)| global V.S. local|
9-
| 1 sequence : max/`min`(*)| 132|[Palindrome Partitioning II](https://github.com/interviewcoder/leetcode/tree/master/src/_132_PalindromePartitioningII)||
10-
| 1 sequence :`max`/min(*)| 032|[Longest Valid Parentheses](https://github.com/interviewcoder/leetcode/tree/master/src/_032_LongestValidParentheses)| global V.S. local|
11-
| 1 sequence :`max`/min(*)| 121| Best Time to Buy and Sell Stock||
12-
| 1 sequence :`max`/min(*)| 123| Best Time to Buy and Sell Stock III||
13-
| 1 sequence : count(*)| 091| Decode Ways||
14-
| 1 sequence : all(*)| 140| Word Break II: dp + backtracking||
15-
| 2 sequences : boolean(*)| 044| Wildcard Matching||
16-
| 2 sequences : boolean(*)| 087| Scramble String||
17-
| 2 sequences : boolean(*)| 010| Regular Expression Matching||
18-
| 2 sequences : boolean(*)| 097| Interleaving String| DFS->Memo->Bottomup|
19-
| 2 sequences : max/`min`(*)| 072| Edit Distance| DFS->Memo->Bottomup|
20-
| 2 sequences : count(*)| 115| Distinct Subsequences| DFS->Memo->Bottomup|
21-
| Matrix : max/`min`(*)| 120| Triangle||
22-
| Matrix : max/`min`(*)| 174| Dungeon Game||
23-
| Matrix : max/`min`(*)| 064| Minimum Path Sum||
24-
| Matrix :`max`/min(*)| 085| Maximal Rectangle||
25-
| Matrix :`max`/min(*)| 221| Maximal Square||
26-
| Matrix : count(*)| 062| Unique Paths||
27-
| Matrix : count(*)| 063| Unique Paths II||
28-
|** : count(*)| 096| Unique Binary Trees||
29-
|** : count(*)| 070| Climbing Stairs||
30-
|** : all(*)| 095| Unique Binary Trees II||
2+
3+
1. 1 sequence dp
4+
5+
|||||
6+
| ---------------------:|:---:| :-----:| :---|
7+
| 1 sequence : boolean(*)| 139|[Word Break](https://github.com/interviewcoder/leetcode/tree/master/src/_139_WordBreak)||
8+
| 1 sequence :`max`/min(*)| 198| House Robber||
9+
| 1 sequence :`max`/min(*)| 213|[House Robber II](https://github.com/interviewcoder/leetcode/tree/master/src/_213_HouseRobberII)||
10+
| 1 sequence :`max`/min(*)| 053|[Maximum Subarray](https://github.com/interviewcoder/leetcode/tree/master/src/_053_MaximumSubarray)||
11+
| 1 sequence :`max`/min(*)| 152|[Maximum Product Subarray](https://github.com/interviewcoder/leetcode/blob/master/src/_152_MaximumProductSubarray/Solution.java)| global V.S. local|
12+
| 1 sequence : max/`min`(*)| 132|[Palindrome Partitioning II](https://github.com/interviewcoder/leetcode/tree/master/src/_132_PalindromePartitioningII)||
13+
| 1 sequence :`max`/min(*)| 032|[Longest Valid Parentheses](https://github.com/interviewcoder/leetcode/tree/master/src/_032_LongestValidParentheses)| global V.S. local|
14+
| 1 sequence :`max`/min(*)| 121| Best Time to Buy and Sell Stock||
15+
| 1 sequence :`max`/min(*)| 123| Best Time to Buy and Sell Stock III||
16+
| 1 sequence : count(*)| 091| Decode Ways||
17+
| 1 sequence : all(*)| 140| Word Break II: dp + backtracking||
18+
19+
20+
2. 2 sequences dp
21+
22+
|||||
23+
| ---------------------:|:---:| :-----:| :---|
24+
| 2 sequences : boolean(*)| 044| Wildcard Matching||
25+
| 2 sequences : boolean(*)| 087| Scramble String||
26+
| 2 sequences : boolean(*)| 010|[Regular Expression Matching](https://github.com/interviewcoder/leetcode/tree/master/src/_010_RegularExpressionMatching)| DFS -> Memo -> Bottomup|
27+
| 2 sequences : boolean(*)| 097|[Interleaving String](https://github.com/interviewcoder/leetcode/tree/master/src/_097_InterleavingString)| DFS->Memo->Bottomup|
28+
| 2 sequences : max/`min`(*)| 072| Edit Distance| DFS->Memo->Bottomup|
29+
| 2 sequences : count(*)| 115| Distinct Subsequences| DFS->Memo->Bottomup|
30+
31+
32+
3. matrix dp
33+
34+
|||||
35+
| ---------------------:|:---:| :-----:| :---|
36+
| Matrix : max/`min`(*)| 120| Triangle||
37+
| Matrix : max/`min`(*)| 174| Dungeon Game| hard|
38+
| Matrix : max/`min`(*)| 064| Minimum Path Sum||
39+
| Matrix :`max`/min(*)| 085| Maximal Rectangle||
40+
| Matrix :`max`/min(*)| 221| Maximal Square||
41+
| Matrix : count(*)| 062| Unique Paths||
42+
| Matrix : count(*)| 063| Unique Paths II||
43+
44+
45+
4. other dp
46+
47+
|||||
48+
| ---------------------:|:---:| :-----:| :---|
49+
|** : count(*)| 096| Unique Binary Trees||
50+
|** : count(*)| 070| Climbing Stairs||
51+
|** : all(*)| 095| Unique Binary Trees II||

‎doc/category_partition.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
####Category : : Partition
2+
3+
######where`partition` technique makes amazing
4+
5+
| Type| #| Description|
6+
| ---------------------:|:---:| :------------|
7+
| at most 1 duplicate `||` others| 026|[Remove Duplicates From Sorted Array](https://github.com/interviewcoder/leetcode/blob/master/src/_026_RemoveDuplicatesFromSortedArray/Solution.java)|
8+
| at most k duplicates `||` others| 080|[Remove Duplicates From Sorted ArrayII](https://github.com/interviewcoder/leetcode/tree/master/src/_080_RemoveDuplicatesFromSortedArrayII)|

‎doc/category_subarray.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
|`start` +`end`|| determine`start` and`end` index|
66
| Two Pointers| 011|[Container With Most Water](https://github.com/interviewcoder/leetcode/blob/master/src/_011_ContainerWithMostWater/Solution.java)| O(N^2) -> O(N)|
77
|`continuous`|| continuous subarray||
8-
| Two Pointers : maxsize| 003|[Longest Substring Without Repeating Characters](https://github.com/interviewcoder/leetcode/blob/master/src/_003_LongestSubstringWithoutRepeatingCharacters/Solution.java)| O(N^3) -> O(N) + O(N) hash|
98
| Two Pointers : maxsize| 005|[Longest Palindromic Substring](https://github.com/interviewcoder/leetcode/blob/master/src/_005_LongestPalindromicSubstring/Solution.java)| O(N^3) -> O(N^2)|
9+
| Two Pointers : maxsize| 003|[Longest Substring Without Repeating Characters](https://github.com/interviewcoder/leetcode/blob/master/src/_003_LongestSubstringWithoutRepeatingCharacters/Solution.java)| O(N^3) -> O(N) + O(N) hash|
10+
| Two Pointers : minsize| 076|[Minimum Window Substring](https://github.com/interviewcoder/leetcode/tree/master/src/_076_MinimumWindowSubstring)| O(N^3) -> O(N) + O(N) hash|
1011
| Two Pointers : minsize| 209|[Minimum Size Subarray Sum](https://github.com/interviewcoder/leetcode/tree/master/src/_209_MinimumSizeSubarraySum)| O(N^3) -> O(N)|
1112
|`subsequence`||||

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp