Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Partition List
Bookmark
Collect into Array
Two Dummy Lists
Input
Example 1
Already partitioned
Reverse order
Custom
values
=
[1, 4, 3, 2, 5, 2]
,
x
=
3
1
4
3
2
5
2
1
4
3
2
5
2
current
1
4
3
2
5
2
current
1
4
3
2
5
2
current
1
4
3
2
5
2
current
1
4
3
2
5
2
tail
1
2
tail
1
2
2
4
tail
1
2
2
4
3
1
2
2
4
3
5
algo
master
.
io
Step:
Start: bucket the values, then build a new list in partitioned order
0 / 15
Input
Example 1
Already partitioned
Reverse order
Custom
values
=
[1, 4, 3, 2, 5, 2]
,
x
=
3
0 / 15
algo
master
.
io
Step:
Start: bucket the values, then build a new list in partitioned order