Available question text
Given positions of existing gas stations and a budget k of new stations to add, place the k stations to minimize the maximum distance between adjacent stations on the line. This is typically solved by binary-searching the minimum possible maximum gap (a real value) and greedily checking whether that gap can be achieved by counting how many new stations each interval needs.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Amazon
Leetcode 774. Minimize Max Distance to Gas Station
Interview reported: Nov 12, 2024 · 1 source report
JUNIOR
Source snapshot: Nov 12, 2026
View source