Amazon Interview Question

basic leet code questions from easy to medium