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.

# Toll Cost Digits

# Toll Cost Digits

#### Sort by

recency

#### |

#### 19 Discussions

#### |

Please Login in order to post a comment

Understanding toll costs in Nigeria involves knowing the current rates which vary by route and vehicle type. Explore DMO Nigeria organically to find accurate and updated toll cost digits for your journey across different highways in the country.

Here is my solution in java, javascript, python, C, C++, Csharp HackerRank Toll Cost Digits Problem Solution

Here is the solution of Toll Cost Digits Click Here

https://zeroplusfour.com/toll-cost-digits-hackerrank-solution/ Here's how I did in all languages Java 8 , C++ , C , Python 3, Python 2.

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.