You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
| 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)|
121
121
| 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.:
163
163
| 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
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)|
| 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|
| comsume cache| 158|[Read N Characteres Given Read4 II](https://github.com/interviewcoder/leetcode/blob/master/src/_158_ReadNCharactersGivenRead4II/Solution.java)|
| 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|
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
10
13
```
11
14
12
15
@@ -25,10 +28,11 @@ Tree Problem
25
28
| level traversal| 103| Binary Tree Zigzag Level Order Traversal|
26
29
|**`Tree::divide and conquer`**|||
27
30
|*`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)|
28
32
|*`post`*-order| 104|[Maximum Depth Of Binary Tree](https://github.com/interviewcoder/leetcode/tree/master/src/_104_MaximumDepthOfBinaryTree)|
29
33
|*`post`*-order| 236|[Lowest Common Ancestor of Binary Tree](https://github.com/interviewcoder/leetcode/tree/master/src/_236_LowestCommonAncestorOfABinaryTree)|
| 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)|
|`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)|