Amazon interview question

there were 3 programming questions