Let G(V,E) be an undirected graph. I want create a breadth-first tree from it storing distance from root to all the vertices in the graph. please help.
G(V,E)