Amazon interview question

Basic coding questions, a lot of algorithm analysis