• + 1 comment

    No need to rotate the array you can do this problem much faster. Take a look here, i have explained it in detail. Circular Array Rotation

    Hope it helped you