# Slow and Fast Pointers

Next type is using two pointers with different speed of movement. Typically they starts from the left end, then the first pointer advances fast and give some feedback to the slow pointer and do some calculation.

<figure><img src="https://assets.leetcode.com/users/images/f6ecb6b1-679e-48f9-91b5-de4602436865_1642138215.8872066.jpeg" alt=""><figcaption></figcaption></figure>

* Linked List Operations\
  (\*) <https://leetcode.com/problems/linked-list-cycle/>\
  <https://leetcode.com/problems/linked-list-cycle-ii/>\
  <https://leetcode.com/problems/remove-nth-node-from-end-of-list/>\
  <https://leetcode.com/problems/rotate-list/>\
  <https://leetcode.com/problems/reorder-list/>\
  <https://leetcode.com/problems/palindrome-linked-list/>
* Cyclic Detection\
  (\*) <https://leetcode.com/problems/find-the-duplicate-number/>\
  <https://leetcode.com/problems/circular-array-loop/>
* Sliding Window/Caterpillar Method\
  ![image](https://assets.leetcode.com/users/images/29d2e356-77fe-4caf-8921-7a39d06e56d2_1642139764.6173265.jpeg)\
  (\*) <https://leetcode.com/problems/number-of-subarrays-with-bounded-maximum/>\
  <https://leetcode.com/problems/find-k-th-smallest-pair-distance/>\
  <https://leetcode.com/problems/moving-stones-until-consecutive-ii/>\
  <https://leetcode.com/problems/count-pairs-of-nodes/>\
  <https://leetcode.com/problems/count-binary-substrings/>\
  <https://leetcode.com/problems/k-diff-pairs-in-an-array/>
* Rotation\
  (\*) <https://leetcode.com/problems/rotating-the-box/>\
  <https://leetcode.com/problems/rotate-array/>
* String\
  (\*) <https://leetcode.com/problems/string-compression/>\
  <https://leetcode.com/problems/last-substring-in-lexicographical-order/>
* Remove Duplicate\
  (\*) <https://leetcode.com/problems/remove-duplicates-from-sorted-array/>\
  <https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/>\
  <https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/>\
  <https://leetcode.com/problems/duplicate-zeros/>
* Others\
  <https://leetcode.com/problems/statistics-from-a-large-sample/>\
  <https://leetcode.com/problems/partition-labels/>\
  <https://leetcode.com/problems/magical-string/>\
  <https://leetcode.com/problems/friends-of-appropriate-ages/>\
  <https://leetcode.com/problems/longest-mountain-in-array/>\
  <https://leetcode.com/problems/shortest-subarray-to-be-removed-to-make-array-sorted/>
