Ezvor

774. Minimize Max Distance to Gas Station

HardArray Preparing judge… LeetCode
ArrayBinary Search

Hints

Hint 1
Use a binary search. We'll binary search the monotone function "possible(D) = can we use K or less gas stations to ensure each adjacent distance between gas stations is at most D?"