Practice · 2 of 6
Rotate right
CHALLENGE
Difficulty: intermediate+25 XP
Implement int[] rotateRight(int[] arr): a NEW array shifted right by one, last element wrapping to the front. Write the two failure cases (length 0 and 1) into your loop before running anything.
Press Submit to check your solution.
Back to lesson: Practice: Array lab