Completed short path search with BFS.