Tech Mahindra interview question

Problem solving in our comfortable language