Problem
Input format
The first line contains `n` and `k` separated by a space. The second line contains `n` integers separated by spaces. - `1 <= n <= 1000` - `0 <= k <= 1000000` (may be larger than `n`) - array values are integers between `-1000000` and `1000000`
Output format
The program prints to standard output the `n` elements of the rotated array, separated by spaces, followed by a newline.
Example
5 2 1 2 3 4 5
3 4 5 1 2
Stuck?
Use the Get Hint button in the action bar to reveal a guided hint.
💬 Discussion
Loading...No comments yet. Be the first to start the discussion!
Sample cases (from the problem)
Sample Case 1
5 2 1 2 3 4 5
3 4 5 1 2
Solve it your way first
Community solutions unlock after you submit a passing solution. Don't peek.
Ready to solve this challenge?
Create a free account to write code, submit solutions, and track your progress.