Tech Mahindra interview question

Entirely technical