Tech Mahindra interview question

Basic on my academic knowledge