Amazon interview question

Sliding window question, relatively easy.