Amazon Interview Question

2 questions on data structures