NeetCode #302LC-774HardBinary Search
← Back to All Problems

#302 · #774 · Minimize Max Distance to Gas Station(最小化加油次数)

📌 Problem Statement & Constraints

You are given a sorted array stations of gas station positions and an integer k. You may add k new stations anywhere. Return the smallest possible maximum distance between adjacent stations after adding them. Answers within 10^-6 are accepted. Constraints: 10 <= stations.length <= 2000, 0 <= stations[i] <= 10^8, 1 <= k <= 10^6.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!