Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Partition Array Such That Maximum Difference Is K
Bookmark
Input
Standard
Example 2
Larger
Custom
nums
=
[3, 6, 1, 2, 5]
,
k
=
2
k
= 2
partitions
= 0
groupMin
= -
diff
= -
3
0
6
1
1
2
2
3
5
4
algo
master
.
io
Step:
Start: Partition array such that max difference in each group is at most k.
0 / 15
Input
Standard
Example 2
Larger
Custom
nums
=
[3, 6, 1, 2, 5]
,
k
=
2
0 / 15
k
= 2
partitions
= 0
groupMin
= -
diff
= -
3
0
6
1
1
2
2
3
5
4
algo
master
.
io
Step:
Start: Partition array such that max difference in each group is at most k.