Single pass. Reset start when tank goes negative.
def canCompleteCircuit(gas, cost): totalTank = currTank = 0 start = 0
for i in range(len(gas)):
totalTank += gas[i] - cost[i]
currTank += gas[i] - cost[i]
if currTank < 0:
start = i + 1
currTank = 0
return start if totalTank >= 0 else -1
time, space.