This function performs a circular shift to an array. Positive values of shifts will shift to the right and negative values will do to the left.
array
shift
xRotate([1,2,3,4],1) -> [4,1,2,3] Copy
xRotate([1,2,3,4],1) -> [4,1,2,3]
xRotate([1,2,3,4],-1) -> [2,3,4,1] Copy
xRotate([1,2,3,4],-1) -> [2,3,4,1]
This function performs a circular shift to an array. Positive values of shifts will shift to the right and negative values will do to the left.