Amazon Interview Question

Expect easy and medium code challenges.