Flipkart interview question

Sliding window technique.