Amazon Interview Question

2 problem solving hard questions