Tech Mahindra interview question

nothing is difficult here