Sliding Window Problems

I found these good sliding window problems on Techie Delight. Can anyone suggest few more problems that can be solved with sliding window technique? I would be very interested in solving a few more…

  1. Find the longest substring of given string containing k distinct characters

  2. Find all substrings of a string that are permutation of a given string

  3. Longest substring of given string containing distinct characters

  4. Find maximum length sequence of continuous ones (Using Sliding Window)

  5. Find the maximum sequence of continuous 1’s that can be formed by replacing at-most k zeroes by ones

  6. Find minimum sum subarray of given size k

  7. Find subarray having given sum in given array of integers

  8. Find the length of smallest subarray whose sum of elements is greater than the given number

  9. Find count of distinct elements in every sub-array of size k

  10. Count the distinct absolute values in the sorted array

  11. Print all sub-arrays of an array having distinct elements

  12. Find duplicates within given range k in an array



Anybody would like to suggest more problems?

Have a look at

Spoj 1
Spoj 2
Spoj 3

Here is another one