Tech Mahindra interview question

Data Structures and OOPS Concepts