Search
⌘K
Get Premium
Leetcode 871. Minimum Number of Refueling Stops
Given a target distance, initial fuel, and stations at positions with fuel amounts, determine the minimum number of refueling stops needed to reach the target (or return -1 if impossible). The core challenge is a greedy selection of which past stations to use (commonly solved with a max-heap/priority-queue to take the largest available fuel when you run out).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.