Amazon Interview Question

Coding task were iterating a list using shifting windows.