/spanning-tree

A simple implementation of a spanning tree with sparse array

Primary LanguageC

Spanning tree

A simple implementation of spanning tree T of an undirected graph G a subgraph that includes all of the vertices of G that is a tree. In general, a graph may have several spanning trees, but a graph that is not connected will not contain a spanning tree (but Spanning forests). If all of the edges of G are also edges of a spanning tree T of G, then G is a tree and is identical to T (that is, a tree has a unique spanning tree and it is itself).