Amazon Interview Question

The coding challenge had very basic coding errors, such as off by one, missing braces, etc.