A car starts with startFuel units of fuel and must travel target miles, using one unit per mile. stations[i] = [position, fuel] describes a station that gives all its fuel when you stop. Return the fewest stops needed to reach the target, or -1 if it is impossible.
Practise this challenge
All coding challenges