We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
It looks like this task has error in accepted answer.
Truck can start from pump P and go clockwise and counter-clockwise (0->1->2 VS 2->1->0), both way completing the circle from starting point P. The accepted answers considers only clockwise movement. and it's wrong.
Example circle for which backward movement gives result index 0: [10,25;10,1;10,1]
Truck Tour
You are viewing a single comment's thread. Return to all comments →
It looks like this task has error in accepted answer. Truck can start from pump P and go clockwise and counter-clockwise (0->1->2 VS 2->1->0), both way completing the circle from starting point P. The accepted answers considers only clockwise movement. and it's wrong.
Example circle for which backward movement gives result index 0: [10,25;10,1;10,1]