Yamaha Motor Interview Question

question was based on linked list