Input: {1,2}, 3
Output: {1,2}
Expected: {2,1}
it is meanless, or the result should be {1,2}, since
input {1,2} 2
output is {1,2}
'Rotate by 1' means to move the last element to the very beginning.
'Rotate by n' means to repeat 'Rotate by 1' n times.
So for {1,2}, 3, what you do is basically swap the nodes 3 times, and in the end, you get {2, 1}.
{1, 2}, 2 is naturally 2 because it is what you should get after 2 swaps.