Expand description
Often when working with trees we are given them as a graph with undirected edges, however
sometimes a better representation is a rooted tree. This module (and the with_parent
submodule) contains
implementations to build a tree from its adjacency list representation with a given root id.
- Time Complexity: O(V+E)
§Resources
Modules§
- with_
parent - This module contains implementations of tree rooting for node types that contain a pointer to the parent.