You are viewing a single comment's thread. Return to all comments →
def truckTour(petrolpumps): start, cum = 0, 0 for i in range(len(petrolpumps)): petrol, distance = petrolpumps[i] cum += petrol - distance if cum < 0: start = i + 1 cum = 0 return start
Seems like cookies are disabled on this browser, please enable them to open this website
Truck Tour
You are viewing a single comment's thread. Return to all comments →