class Solution:
def canCompleteCircuit(self, gas: List[int], cost: List[int]) -> int:
if sum(gas) < sum(cost): return -1
totalGas = 0
start = 0
for i in range(len(gas)):
totalGas = totalGas + gas[i] - cost[i]
if totalGas < 0:
start = i + 1
totalGas = 0
return start