Amazon interview question

Programming technical questions.