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
Copy file name to clipboardexpand all lines: README.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -181,7 +181,8 @@ Also, there are open source implementations for basic data structs and algorithm
181
181
| 811 |[Subdomain Visit Count](https://leetcode.com/problems/subdomain-visit-count/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/811_Subdomain_Visit_Count.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/811_Subdomain_Visit_Count.java)| String split and HashMap, O(n) and O(n) |
182
182
| 819 |[Most Common Word](https://leetcode.com/problems/most-common-word/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/819_Most_Common_Word.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/819_Most_Common_Word.java)| String processing, be careful about 'b,b,b'. regex is recommended. |
183
183
| 844 |[Backspace String Compare](https://leetcode.com/problems/backspace-string-compare/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/844_Backspace_String_Compare.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/844_Backspace_String_Compare.java)| 1. Stack pop when encounters #, O(n) and O(n)<br>2. Compare string from end to start, O(n) and O(1) |
184
-
| 852 |[Peak Index in a Mountain Array](https://leetcode.com/problems/peak-index-in-a-mountain-array/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/852_Peak_Index_in_a_Mountain_Array.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/852_Peak_Index_in_a_Mountain_Array.java)| 1. Scan the array until encountering decline, O(n) and O(1)<br>2. Binary seach with additional check for [i + 1], O(logn) and O(1)|
184
+
| 852 |[Peak Index in a Mountain Array](https://leetcode.com/problems/peak-index-in-a-mountain-array/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/852_Peak_Index_in_a_Mountain_Array.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/852_Peak_Index_in_a_Mountain_Array.java)| 1. Scan the array until encountering decline, O(n) and O(1)<br>2. Binary seach with additional check for [i + 1], O(logn) and O(1) |
| 876 |[Middle of the Linked List](https://leetcode.com/problems/middle-of-the-linked-list/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/876_Middle_of_the_Linked_List.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/876_Middle_of_the_Linked_List.java)| 1. Copy to array, O(n) and O(n)<br>2. Fast and slow point, where fast point is 2 times faster than slow point, O(n) and O(1) |
186
187
| 904 |[Fruit Into Baskets](https://leetcode.com/problems/fruit-into-baskets/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/904_Fruit_Into_Baskets.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/904_Fruit_Into_Baskets.java)| 1. Scan through blocks of tree, O(n) and O(n)<br>2. Mainten a sliding window with start and curr point, O(n) and O(n). |
187
188
| 905 |[Sort Array By Parity](https://leetcode.com/problems/sort-array-by-parity/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/905_Sort_Array_By_Parity.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/905_Sort_Array_By_Parity.java)| 1. Sort with condition, O(nlogn) and O(1)<br>2. Scan all and split odd and even number into different array, O(n) and O(n)<br>3. In place swap similar to quick sort, O(n) and O(1) |
0 commit comments