Amazon Interview Question

Q: Amazon online code challenge