Pregunta de entrevista de Sixt

Sliding window maximum question with code