Fix function visibility. Remove function prototype.
shortest path using breadth-first-search algorithm.