Pergunta de entrevista da empresa Amazon

Sliding window and a non-algorithm python question