Tech Mahindra interview question

Problems in aptitude round were difficult