Problem 774 · Hard

Minimize Max Distance to Gas Station

Binary search on the largest allowed gap: count the stations each gap needs and compare with k.

Open the interactive visualisation