solulubeta
Sign in
NeetCode 150 / Greedy
15.04 · Problem

Gas Station

Medium Greedy: restart after a deficit 1 video LC 134 Pro

This problem is part of solulu Pro

Gas stations sit on a circular route. Station i gives gas[i] fuel, and driving from i to i + 1 uses cost[i]. Starting with an empty tank, return the index of the station from which you can drive once around the circuit,…

Lifetime ₹1,999 ₹999 · Launch offer
Mark this problem as solved when you are finished.

Item 125 of 150 · updated 2026-10-12