Amazon Interview Question

2 BQ questions 2 coding question 1 easy, 1 medium