Comment Comment by 61u You could just run bfs from both starting and ending nodes until you find a node reachable from both the starting and ending nodes. parent 61u 2 years ago