Amazon interview question

basic leet code questions from easy to medium