Amazon interview question

Some easy algorithmics problems