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.
Yes, it will help a tremendous amount. Basically, this is a text-book Breadth-first search (BFS) problem, that's also why this problem has been categorized within the "Queue" category, since BFS implementations rely on a Queue. Knowing Graph theory will allow you to understand the concept of Breadth or Depth-first search much quicker, it'll make much more sense.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Castle on the Grid
You are viewing a single comment's thread. Return to all comments →
Yes, it will help a tremendous amount. Basically, this is a text-book Breadth-first search (BFS) problem, that's also why this problem has been categorized within the "Queue" category, since BFS implementations rely on a Queue. Knowing Graph theory will allow you to understand the concept of Breadth or Depth-first search much quicker, it'll make much more sense.