Problem 774 · Hard
Binary search on the largest allowed gap: count the stations each gap needs and compare with k.
Open the interactive visualisation