Given an integer array, nums, shift its elements to the right by k positions. In other words, rotate the array to the right by k steps, where k is non-negative.
Constraints:
1≤nums.length≤103
−2 ...
⋮
Problem
Submissions
Solution: Rotate Array
Statement▼
Given an integer array, nums, shift its elements to the right by k positions. In other words, rotate the array to the right by k steps, where k is non-negative.