Shortest Path?

Given an unweighted, undirected and connected graph consists of $N$ nodes numbered from $1$ to $N$. Total $M$ edges connecting the nodes.


This is a companion discussion topic for the original entry at https://toph.co/p/shortest-path