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.
I made the same mistake but bought a solution. When i walked through all those nodes, i realised that when my algo has to many 12s in it and the solution much less, that it is not unidirectional and added the other way around into my list as well :)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Breadth First Search: Shortest Reach
You are viewing a single comment's thread. Return to all comments →
I made the same mistake but bought a solution. When i walked through all those nodes, i realised that when my algo has to many 12s in it and the solution much less, that it is not unidirectional and added the other way around into my list as well :)