Amazon interview question

2 questions on Data Structures to be solved on Hackerrrank