There are n petrol pumps arranged in a circle. For each pump i you are given gas[i], the amount of petrol available there, and cost[i], the amount of petrol needed to travel from pump i to the next…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.