Amazon interview question

Sliding window question on arrays