# Two Pointers & Sliding Window

### Binary Search

* [704. Binary Search](https://leetcode.com/problems/binary-search/)
* [33. Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/)
* [981. Time Based Key-Value Store](https://leetcode.com/problems/time-based-key-value-store/)
* ​[392. Is Subsequence](https://leetcode.com/problems/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

* [876. Middle of the Linked List](https://leetcode.com/problems/middle-of-the-linked-list/)

* [234. Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/)

* [141. Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/)

* 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

* [977. Squares of a Sorted Array](https://leetcode.com/problems/squares-of-a-sorted-array/)
* [844. Backspace String Compare](https://leetcode.com/problems/backspace-string-compare/)
* [283. Move Zeroes](https://leetcode.com/problems/move-zeroes/)
* [15. 3Sum](https://leetcode.com/problems/3sum/)
* [392. Is Subsequence](https://leetcode.com/problems/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
  * loop with slower pointer and loop with faster pointer
* [5. Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/)
* [76. Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring/): Edge cases.
* Trapping Water / Rain:
  * [11. Container With Most Water](https://leetcode.com/problems/container-with-most-water/) Two-pointer
  * [42. Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/): Two-pointer

#### Two Pointer with HashSet/Map

* [3. Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/)

### Sliding Window

* [643. Maximum Average Subarray I](https://leetcode.com/problems/maximum-average-subarray-i/)

### Other

* [121. Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)
