Search⌘ K
AI Features

Minimize Max Distance to Gas Station

Minimize Max Distance to Gas Station asks you to place a fixed number of new stations along a line with existing stations and return the smallest possible maximum gap between adjacent stations.

Statement

You are given an integer array, stations, representing the positions of existing gas stations along the x-axis. You are also ...