Technical Design Interview Questions

32,793 technical design interview questions shared by candidates

There are n gas stations positioned along a circular road. Each has a limited supply of gas. You can only drive clockwise around the road. You start with zero gas. Knowing how much gas you need to get from each gas station to the next and how much gas you can get at each station, design an algorithm to find the gas station you need to start at to get all the way around the circle.
avatar

Technical Architect

Interviewed at Yahoo

4
Oct 3, 2010

There are n gas stations positioned along a circular road. Each has a limited supply of gas. You can only drive clockwise around the road. You start with zero gas. Knowing how much gas you need to get from each gas station to the next and how much gas you can get at each station, design an algorithm to find the gas station you need to start at to get all the way around the circle.

Viewing 31 - 40 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 32,793 interview questions and reports from Technical design interviews. Prepare for your interview. Get hired. Love your job.