Arrange the array CodeChef Solution