Two Pointers

Walk inward or alongside with two indexes to avoid comparing every pair.

  1. 01

    Check a Palindrome

    • easy
  2. 02

    Pair Sum in a Sorted List

    • easy
    • Pro
  3. 03

    Remove Duplicates in Place

    • easy
    • Pro
  4. 04

    Move Zeros to the End

    • easy
    • Pro
  5. 05

    Container with Most Water

    • medium
    • Pro
  6. 06

    Sort Three Colours

    • medium
    • Pro
  7. 07

    Three Numbers Summing to Zero

    • hard
    • Pro
  8. 08

    Trap the Rainwater

    • hard
    • Pro