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 admit that test cases have multiple snacks and ladders. But every solution contains only one ladder included. I used BFS and just substracted -1 . correct solution needs dijkstra to be implemented because there can be cases where more than one ladder is used in optimal solution.Thats why I am saying test cases are really very week .
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Snakes and Ladders: The Quickest Way Up
You are viewing a single comment's thread. Return to all comments →
I admit that test cases have multiple snacks and ladders. But every solution contains only one ladder included. I used BFS and just substracted -1 . correct solution needs dijkstra to be implemented because there can be cases where more than one ladder is used in optimal solution.Thats why I am saying test cases are really very week .