Sliding Window

For finding subarrays/substrings with a specific criteria.

  1. Use Two pointers: start and end to represent a window
  2. Move end to find a valid window
  3. When a valid window is found, move start to find a smaller(better) window.