solulubeta
Sign in
Story Problems / Greedy
06.04 · Problem

Petrol Pump Round Trip

Medium Running tank + reset (circular route) Pro

This problem is part of solulu Pro

There are n petrol pumps on a circular road. Pump i has gas[i] litres and the trip to the next pump costs cost[i] litres. You start with an empty tank at some pump, must fill up there, and drive around the circle once.…

Lifetime ₹2,000 ₹1,000 · Beta offer
Mark this problem as solved when you are finished.

Item 58 of 94 · updated 2026-10-12