Minimum Number of Refueling Stops
A car travels from a starting position to a destination which is target miles east. Along the way, there are gas stations. Return the minimum number of refueling stops the car must make to reach destination. If it cannot reach the destination, return -1.
Minimum Number of Refueling Stops

A car travels from a starting position to a destination which is target miles east. Along the way, there are gas stations. Return the minimum number of refueling stops the car must make to reach destination. If it cannot reach the destination, return -1.

Example 1:
Input: {"target":100,"startFuel":10,"stations":[[10,60],[20,30],[30,30],[60,40]]}
Output: 2
Input
arr ={"target":100,"startFuel":10,"stations":[[10,60],[20,30],[30,30],[60,40]]}

Target: 100 miles, Start fuel: 10, Stations: 4

State
target
100
startFuel
10
stationCount
4
Variables
No variables to display
DepthFunction Call
Stack empty
0/3