Tech Mahindra interview question

some technical questions