Amazon Interview Question

It was a programming question