← Amazon questions

Gas Station Circular Route

Filed under Amazon

There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.