Can anyone help solve this complex algorithmic problem?
Posted
by
Locaaaaa
on Programmers
See other posts from Programmers
or by Locaaaaa
Published on 2011-11-15T10:46:10Z
Indexed on
2011/11/16
2:07 UTC
Read the original article
Hit count: 325
c#
|algorithms
I got this question in an interview and I was not able to solve it.
- You have a circular road, with N number of gas stations.
- You know the ammount of gas that each station has.
- You know the ammount of gas you need to GO from one station to the next one.
- Your car starts with 0.
The question is: Create an algorithm, to know from which gas station you must start driving.
As an exercise to me, I would translate the algorithm to C#.
© Programmers or respective owner