I Problem
There are n
gas stations along a circular route, where the amount of gas at the iᵗʰ
station is gas[i]
.
You have a car with an unlimited gas tank and it costs cost[i]
of gas to travel from the iᵗʰ
station to its next (i + 1)ᵗʰ
station. You begin the journey with an empty tank at one of the gas stations.