Back to problems

Minimum Number of Refueling Stops

Algorithm · Waymo · Medium

Problem: Minimum Refueling Stops A vehicle begins at location 0 and must travel to location target. Its tank starts with startFuel liters, and traveling one unit of distance uses one liter of fuel. The route contains a number of fuel stations. For each entry stations[i] = [position_i, fuel_i], the station is position_i units from the starting point and holds fuel_i liters. At any station the vehicle may either continue without stopping or stop and take the station's entire…

Checking your access…