You are viewing a single comment's thread. Return to all comments →
I'm assuming you're talking about the sample input in the problem. There is no edge from 1 to 4 as the picture in the problem shows, so it is -1.
HackerRank solutions.
Seems like cookies are disabled on this browser, please enable them to open this website
BFS: Shortest Reach in a Graph
You are viewing a single comment's thread. Return to all comments →
I'm assuming you're talking about the sample input in the problem. There is no edge from 1 to 4 as the picture in the problem shows, so it is -1.
HackerRank solutions.