Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Rotate List
Bookmark
Brute Force
Find Split Point
Input
Example 1
Example 2
Example 3
Custom
values
=
[1, 2, 3, 4, 5]
,
k
=
2
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
tail
1
2
3
4
5
tail
1
2
3
4
5
tail
1
2
3
4
5
tail
1
2
3
4
5
1
2
3
4
5
head
1
2
3
4
5
head
1
2
3
4
5
head
1
2
3
4
5
head
algo
master
.
io
Step:
Start: rotate right by moving the last node to the front, k times
0 / 11
Input
Example 1
Example 2
Example 3
Custom
values
=
[1, 2, 3, 4, 5]
,
k
=
2
0 / 11
algo
master
.
io
Step:
Start: rotate right by moving the last node to the front, k times