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.

So whenever a path circles back to the START, then you can mark all abovementioned paths as already visited.

GivenSTARTtoSTART:[0,4]# means that START->START can be reached on all even numbers [0,2,4,6,8]GivenSTART->NODE_A=[3]# means that NODE_A can be reached from START_NODE with a path that end with [3]# Because START can reach itself with paths ending with [0,2,4,6,8]# Means we can reach START->NODE_A with [3] + [0,3,4,6,8] = [3,5,7,9,11] = [ 3,5,7,9,1]

I'm trying this out right now, but i believe that you can calculate only the distances from a single node, then be able to infer the distances between all of the other nodes.

## Toll Cost Digits

You are viewing a single comment's thread. Return to all comments →

I have not yet found how to solve this within the time limit, but an interesting aside.

Using DFS/BFS on a random start node, when the path reaches back to the start node, then interesting things happen.

Any loop back to the starting node that ends with

So whenever a path circles back to the START, then you can mark all abovementioned paths as already visited.

Another interesting mechanic, is that

I'm trying this out right now, but i believe that you can calculate only the distances from a single node, then be able to infer the distances between all of the other nodes.