Tech Mahindra interview question

data structures and oops concepts