How can we do rotation anti cock wise

here in this question we did rotation clockwise,
how can we do antilock wise

EX:-
input:-

array:1 2 3 4 5 6 7 8,
r:2,
out:-
3 4 5 6 7 8 1 2