Place K magnetic balls to maximize the minimum distance between them.
Constraints
Example
>>> max_distance([1, 2, 3, 4, 7], 3) 3 >>> max_distance([5, 4, 3, 2, 1, 1000000000], 2) 999999999 >>> max_distance([10, 2, 8], 2) 8
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints