Better HN
topnewbestaskshowjobs
Log inSign up

61u

1 karma · joined Apr 16, 2024 (2y ago) · 3 submissions

Submissions

comment 2y ago · link · parent

https://ideone.com/MGFwdo

I am running BFS from only the starting node because the graph is symmetrical.

comment 2y ago · link · parent

Just wondering... How do you calculate the minimum number of steps fast enough?

comment 2y ago · link · parent

You could just run bfs from both starting and ending nodes until you find a node reachable from both the starting and ending nodes.