Amazon Interview Question

two coding questions in 60 minutes