Here, Are 4 Different Pattern of problems where we can see. when it come to use these both approaches

  1. Constant Window
  2. Longest Subarray / Substrings with sum ≤ k
  3. No. of Subarray where <Condition>
  4. Shortest minimum Window

Maximum Points You Can Obtain from Cards

Longest Substring Without Repeating Characters

Max Consecutive Ones III