Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Can we solve this problem using sorting and binary search?
Sort the array in increasing order and run a binary search on the number of groups, x.
To determine if a value x is feasible, greedily distribute the numbers such that each group receives 1, 2, 3, ..., x numbers.