Breadth First Search with shortest path and distance from the initial vertex.