Tech Mahindra interview question

Questions based on array concept