Problems / Greedy / Gas Station
#125 Medium Time O(n) Space O(1) Animated

Gas Station

Find a starting gas station to complete the circuit.

LeetCode ↗
Approach: Greedy
Click play to start
Step 0 / 0
Press play to start the visualization.

Steps