Two Pointers & Sliding Window
Binary Search
392. Is Subsequence follow up: Binary search on character positions. 1) Build a map from each character to all its indices; 2) For each s, do a greedy binary search for each character in t
Slow Fast Pointer
No. 287: Fast and slow pointer. Find circle in a linked list.
No. 26: Remove Duplicates from Sorted Array
No. 27: Remove Element
No. 80: Remove Duplicates from Sorted Array II
Two pointer
follow up: Binary search on character positions. 1) Build a map from each character to all its indices; 2) For each s, do a greedy binary search for each character in t
loop with slower pointer and loop with faster pointer
76. Minimum Window Substring: Edge cases.
Trapping Water / Rain:
11. Container With Most Water Two-pointer
42. Trapping Rain Water: Two-pointer
Two Pointer with HashSet/Map
Sliding Window
Other
Last updated