about | help | code help+videos | done | prefs |
Write a method that rotates an array by 'offset' amount, where 'offset' is a non-negative integer less than the length of the array. The 'offset' is how much you move the elements to the left by. Look at the test data for examples. feb5_2016_HL_rotateArray([1, 2, 3, 4, 7], 2) → [3, 4, 7, 1, 2] feb5_2016_HL_rotateArray([5000], 0) → [5000] feb5_2016_HL_rotateArray([], 1) → [] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 290
Copyright Nick Parlante 2017 - privacy