Array
134. Gas Station
A circular route: gas[i] at each station, cost[i] to reach the next. Start empty somewhere and find a station you can drive the full loop from, or return −1. The brute force tries every start and…
Loading…
A circular route: gas[i] at each station, cost[i] to reach the next. Start empty somewhere and find a station you can drive the full loop from, or return −1. The brute force tries every start and…
Loading…