Sliding window problem.