Amazon interview question

Basic OOP and data structure questions