Amazon interview question

2 questions on data structures