Sliding window based problems are asked commonly in interviews especially Facebook and Amazon. These problems have a pattern and it’s good to learn those patterns which will help you in your interview.
In this section, we learn more about sliding windows, fixed and variable size windows, and how we apply it to different problems.
- Longest substring without repeating characters
- Longest substring with 2 or K repeating characters
- Subarray with K different integers
- Longest subarray with K different integers.
- Sliding window maximum/Median
- The maximum sum in K sized window.
- Minimum Window Substring