DP World interview question

They asked a sliding window problem on array