Tech Mahindra interview question

R programming