Amazon Interview Question

General coding puzzles