Complex algorithm for complex problem
- by Locaaaaa
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#.