Let's say that I have a number of linked-list nodes that are connected in a way that it forms a directed graph. If I am currently located at any node (let's call it A) and I want to find another specific node (let's call it B), what kind of algorithm would be most efficient in finding node B without getting stuck in a circular path and capable of terminating if node B cannot be found?