Amazon Interview Question

Two questions in Data Structures and algorithms