Amazon Interview Question

Simple debugging and coding questions.