Pregunta de entrevista de Amazon

Coding task were iterating a list using shifting windows.