Practice ยท 3 of 4
Rotate left
CHALLENGE
Difficulty: beginner+25 XP
Implement static int[] RotateLeft(int[] values, int k) โ a NEW array with elements shifted left k positions, wrapping around. RotateLeft({1,2,3,4,5}, 2) is {3,4,5,1,2}. k larger than the length must still work; null input throws ArgumentException.
Press Submit to check your solution.
Back to lesson: Practice: Array workout