Tech Mahindra interview question

Introduction