Tree
Data Structures ⟩ Graph ⟩ Tree
tree: an (undirected) connected graph in that any pair of vertices has a unique route between them.
leaf: vertex of degree 1 (has only one edge) in a tree.
Let be a connected graph with vertices, then is a tree has exactly edges
Every tree with at least 2 vertices has a leaf. (at least 2 leaves, actually)
👉 First Course in Algorithms Through Puzzles, Sec. 1.6, Graph
Last updated
Was this helpful?