Amazon interview question

DSA question relating to sliding window