Tech Mahindra interview question

general, technical, logical