Amazon interview question

Big O notation questions, and some trick programming questions