VergeSense interview question

Solving basic sliding window problem