All challenges
Algorithm challenge · DSA
Rotate Array
Difficulty
medium
Time
~20m
Format
Single
Grading
Auto-graded
#python#javascript#typescript#go#java#cpp#rust#dsa#arrays
Mission file // read carefullymedium
Rotate nums to the right by k steps and return the result. k may be larger than the array length.
nums = [1,2,3,4,5,6,7], k = 3 => [5,6,7,1,2,3,4]
Build with
rotate(nums: int[], k: int) → int[]PythonJavaScriptTypeScriptGoJavaC++Rust
4 tests · 1 hidden
Auto-graded on submit
Start challenge
Sign in to save your progress.