Tech Mahindra interview question

Thorough interview