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

Commit243258b

Browse files
committed
update doc
1 parentcbbbced commit243258b

File tree

6 files changed

+30
-11
lines changed

6 files changed

+30
-11
lines changed

‎README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ P.S.:
115115
| 075|[Sort Colors](https://github.com/interviewcoder/leetcode/blob/master/src/_075_SortColors/Solution.java)| Medium|`Array``Two Pointers``Sort`||
116116
| 076|[Minimum Window Substring](https://github.com/interviewcoder/leetcode/blob/master/src/_076_MinimumWindowSubstring/Solution.java)| Hard|`Hash Table``Two Pointers``String`|`!`**[substring/sublist]** hashing + two pointers -> O(N)|
117117
| 077|[Combinations](https://github.com/interviewcoder/leetcode/blob/master/src/_077_Combinations/Solution.java)| Medium|`Backtracking`||
118-
| 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))|
118+
| 078|[Subsets](https://github.com/interviewcoder/leetcode/blob/master/src/_078_Subsets/)| Medium|`Array``Backtracking``Bit Manipulation`| 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`||
120120
| 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`||
@@ -163,8 +163,8 @@ P.S.:
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`||
164164
| 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`||
166-
| 126|[Word Ladder II](https://github.com/interviewcoder/leetcode/blob/master/src/_126_WordLadderII/Solution.java)| Hard|`Array``Backtracking``Breadth-first Search``String`||
167-
| 127|[Word Ladder](https://github.com/interviewcoder/leetcode/blob/master/src/_127_WordLadder/Solution.java)| Medium|`Breadth-first Search`||
166+
| 126|[Word Ladder II](https://github.com/interviewcoder/leetcode/blob/master/src/_126_WordLadderII/)| Hard|`Array``Backtracking``Breadth-first Search``String`||
167+
| 127|[Word Ladder](https://github.com/interviewcoder/leetcode/blob/master/src/_127_WordLadder/)| Medium|`Breadth-first Search`||
168168
| 128|[Longest Consecutive Sequence](https://github.com/interviewcoder/leetcode/blob/master/src/_128_LongestConsecutiveSequence/Solution.java)| Hard|`Array`||
169169
| 129|[Sum Root to Leaf Numbers](https://github.com/interviewcoder/leetcode/blob/master/src/_129_SumRootToLeafNumbers/Solution.java)| Medium|`Tree``Depth-first Search`||
170170
| 130|[Surrounded Regions](https://github.com/interviewcoder/leetcode/blob/master/src/_130_SurroundedRegions/Solution.java)| Medium|`Breadth-first Search`||
@@ -198,6 +198,7 @@ P.S.:
198198
| 160|[Intersection of Two Linked Lists](https://github.com/interviewcoder/leetcode/blob/master/src/_160_IntersectionOfTwoLinkedLists/Solution.java)| Easy|`Linked List`| two pointers on two lists; combine long and short lists into one|
199199
| 161|[One Edit Distance](https://github.com/interviewcoder/leetcode/blob/master/src/_161_OneEditDistance/)| Medium|`String`||
200200
| 162|[Find Peak Element](https://github.com/interviewcoder/leetcode/blob/master/src/_162_FindPeakElement/Solution.java)| Medium|`Array``Binary Search`||
201+
| 163|[Missing Ranges](https://github.com/interviewcoder/leetcode/blob/master/src/_163_MissingRanges/Solution.java)| Medium|`Array`||
201202
| 164|[Maximum Gap](https://github.com/interviewcoder/leetcode/blob/master/src/_164_MaximumGap/Solution.java)| Hard|`Sort`||
202203
| 165|[Compare Version Numbers](https://github.com/interviewcoder/leetcode/blob/master/src/_165_CompareVersionNumbers/Solution.java)| Easy|`String`||
203204
| 166|[Fraction to Recurring Decimal](https://github.com/interviewcoder/leetcode/blob/master/src/_166_FractionToRecurringDecimal/Solution.java)| Medium|`Hash Table``Math`||
@@ -280,6 +281,7 @@ P.S.:
280281
| 282| Expression Add Operators| Hard|`Divide and Conquer`||
281282
| 283|[Move Zeroes](https://github.com/interviewcoder/leetcode/blob/master/src/_283_MoveZeroes/Solution.java)| Easy|`Array``Two Pointers`||
282283
| 284| Peeking Iterator| Medium|`Design`||
284+
| 285|[Inorder Successor in BST](https://github.com/interviewcoder/leetcode/tree/master/src/_285_InorderSuccessorInBST)| Medium|`Tree`||
283285
| 286|[Walls And Gates](https://github.com/interviewcoder/leetcode/tree/master/src/_286_WallsAndGates)| Medium|`BFS`||
284286
| 287| Find the Duplicate Number| Hard|`Array``Two Pointers``Binary Search`||
285287

‎doc/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@
2020

2121
0.[Partition](https://github.com/interviewcoder/leetcode/blob/master/doc/category_partition.md)
2222

23-
0.[Subarray Problem](https://github.com/interviewcoder/leetcode/blob/master/doc/category_subarray.md)
23+
0.[Subarray Problem](https://github.com/interviewcoder/leetcode/blob/master/doc/category_subarray.md)
24+
25+
0.[Similar Problems](https://github.com/interviewcoder/leetcode/blob/master/doc/category_similar.md)

‎doc/category_dp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
| 1 sequence :`max`/min(*)| 032|[Longest Valid Parentheses](https://github.com/interviewcoder/leetcode/tree/master/src/_032_LongestValidParentheses)| global V.S. local|
1414
| 1 sequence :`max`/min(*)| 121| Best Time to Buy and Sell Stock||
1515
| 1 sequence :`max`/min(*)| 123| Best Time to Buy and Sell Stock III||
16-
| 1 sequence : count(*)| 091| Decode Ways||
16+
| 1 sequence : count(*)| 091|[Decode Ways](https://github.com/interviewcoder/leetcode/tree/master/src/_091_DecodeWays)||
1717
| 1 sequence : all(*)| 140| Word Break II: dp + backtracking||
1818

1919

‎doc/category_similar.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
####Category :: Some questions sharing similar thinking
2+
| Type| #| Description|
3+
| ---------------------:|:---:| ------------|
4+
| heap V.S. merge| 023|https://github.com/interviewcoder/leetcode/tree/master/src/_023_MergeKSortedLists|
5+
| heap V.S. merge| 218|[The Skyline Problem](https://github.com/interviewcoder/leetcode/tree/master/src/_218_TheSkylineProblem)|
6+
||||
7+
| comsume cache| 158|[Read N Characteres Given Read4 II](https://github.com/interviewcoder/leetcode/blob/master/src/_158_ReadNCharactersGivenRead4II/Solution.java)|
8+
| comsume cache| 284|[Peeking Iterator](https://github.com/interviewcoder/leetcode/blob/master/src/_284_PeekingIterator/Solution.java)|

‎doc/category_subarray.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
|`continuous`|| continuous subarray||
88
| 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)|
99
| 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 : maxsize| 159|[Longest Substring With At Most Two Distinct Characters](https://github.com/interviewcoder/leetcode/blob/master/src/_159_LongestSubstringWithAtMostTwoDistinctCharacters/Solution.java)| O(N^3) -> O(N) + O(2) hash|
1011
| 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|
1112
| Two Pointers : minsize| 209|[Minimum Size Subarray Sum](https://github.com/interviewcoder/leetcode/tree/master/src/_209_MinimumSizeSubarraySum)| O(N^3) -> O(N)|
12-
|`subsequence`||||
13+
|`subsequence`||||
14+
|`other`||||
15+
| Two Pointers : accumulative area| 042|[Trapping Rain Water](https://github.com/interviewcoder/leetcode/blob/master/src/_042_TrappingRainWater/Solution.java)||

‎doc/category_tree.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ Tree Problem
44
1. Iterative
55
1.1) Use stack to simulate recursive DFS
66
1.2) BFS with queue
7-
2. Recursive
7+
8+
2. Recursive (DFS)
89
2.1) visit root first = pre-order = top-down = preorder traversal
910
2.2) visit root last = post-order = bottom-up = divide and conquer
11+
[Lowest Common Ancestor of Binary Tree]
12+
2.3) visit root middle = in-order traversal
1013
```
1114

1215

@@ -25,10 +28,11 @@ Tree Problem
2528
| level traversal| 103| Binary Tree Zigzag Level Order Traversal|
2629
|**`Tree::divide and conquer`**|||
2730
|*`post`*-order| 124|[Binary Tree Maximum Path Sum](https://github.com/interviewcoder/leetcode/tree/master/src/_124_BinaryTreeMaximumPathSum)|
31+
|*`post`*-order| 129|[Sum Root To Leaf Numbers](https://github.com/interviewcoder/leetcode/blob/master/src/_129_SumRootToLeafNumbers/Solution.java)|
2832
|*`post`*-order| 104|[Maximum Depth Of Binary Tree](https://github.com/interviewcoder/leetcode/tree/master/src/_104_MaximumDepthOfBinaryTree)|
2933
|*`post`*-order| 236|[Lowest Common Ancestor of Binary Tree](https://github.com/interviewcoder/leetcode/tree/master/src/_236_LowestCommonAncestorOfABinaryTree)|
3034
|**`BST::order matters`**|||
31-
| inorder + prev| 098|[Validate Binary Search Tree](https://github.com/interviewcoder/leetcode/tree/master/src/_098_ValidateBinarySearchTree)|
32-
| inorder + prev| 099|[Recover Binary Search Tree](https://github.com/interviewcoder/leetcode/tree/master/src/_099_RecoverBinarySearchTree)|
33-
| inorder + prune| Lint|[Search Range In Binary Search Tree](https://github.com/interviewcoder/lintcode/blob/master/03_binarytree%26divideconquer/_02_SearchRangeInBinarySearchTree/Solution.java)|
34-
| inorder + iterative| 173|[Binary Search Tree Iterator](https://github.com/interviewcoder/leetcode/blob/master/src/_173_BinarySearchTreeIterator/Solution.java)|
35+
|`inorder` + prev| 098|[Validate Binary Search Tree](https://github.com/interviewcoder/leetcode/tree/master/src/_098_ValidateBinarySearchTree)|
36+
|`inorder` + prev| 099|[Recover Binary Search Tree](https://github.com/interviewcoder/leetcode/tree/master/src/_099_RecoverBinarySearchTree)|
37+
|`inorder` + prune| Lint|[Search Range In Binary Search Tree](https://github.com/interviewcoder/lintcode/blob/master/03_binarytree%26divideconquer/_02_SearchRangeInBinarySearchTree/Solution.java)|
38+
|`inorder` + iterative| 173|[Binary Search Tree Iterator](https://github.com/interviewcoder/leetcode/blob/master/src/_173_BinarySearchTreeIterator/Solution.java)|

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp