← Adobe questions

Petrol pump problem

Filed under Adobe · Also reported at Samsung

Given a circular route of N petrol pumps, each with an amount of petrol and distance to the next pump, find the starting index such that a truck can complete the circuit without running out of fuel.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Adobe questions

Collected from public candidate posts and coding forums. Updated Nov 2026.