News for hackers. Stuff that matters.

61u

https://ideone.com/MGFwdo

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

Just wondering... How do you calculate the minimum number of steps fast enough?
You could just run bfs from both starting and ending nodes until you find a node reachable from both the starting and ending nodes.