• + 2 comments

    You didn't actually rotated the array, printing the required answer is not the solution. The rotated array might be of some use later in the actual program and the problem is designed to practice the array rotation. Hope you try to understand.