Amazon interview question

Coding task were iterating a list using shifting windows.