top | item 40050919 (no title) 61u | 1 year ago You could just run bfs from both starting and ending nodes until you find a node reachable from both the starting and ending nodes. discuss order hn newest 61u|1 year ago https://ideone.com/MGFwdoI am running BFS from only the starting node because the graph is symmetrical.
61u|1 year ago https://ideone.com/MGFwdoI am running BFS from only the starting node because the graph is symmetrical.
61u|1 year ago
I am running BFS from only the starting node because the graph is symmetrical.