Fade to Solo
Greedy

Gas Station

30 MINMleetcode ↗

Problem

There are gas stations arranged in a circle, each with a gas amount and a cost to travel to the next station. Starting with an empty tank, find the one station index you can start from to complete the full circuit — or determine none exists.

30 MIN00:00unlocks in 30:00
locked30:00 left