Algorithm
Minimize Maximum
Algorithm
Minimize Maximum
How to solve this type of problems
- Use binary search to find an optimal solution
- Find low and high values. Those depend on the problems.
Figure out what those should be by reading the problem carefully.
- Run binary search
- Based on the mid value, create groups checking given array’s values one by one.
- If the number of groups are small, mid value should be smaller to create more groups.
Otherwise, mid value should be bigger to create less groups.