Amadeus Interview Question

Understanding of inheritance and linked list