This preview shows pages 1–9. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Height of a tree Ts root. Level of a node N: If node N is the root of tree T, then node N is at level 1, otherwise level++ every time we reach root of subtree of node N. CMPT 225 Terminology  3 Empty tree Full tree of height H:  All nodes at level < H have max # of children  Nodes @ level H have 0 children ( they are leaves ) Complete tree of height H: is a tree that is full all the way down to level H1 with level H filled in from left to right without any gap. CMPT 225 Terminology  4 Subtree: Recursive Nature of Trees Balanced tree: A Nary tree in which all N subtrees of any nodes have height that differ by at most 1. CMPT 225 Binary Tree Definition: Nary tree where N = 2 Property: If binary tree T has height H then T has between H and 2 H1 nodes...
View Full
Document
 Summer '07
 AnneLavergne

Click to edit the document details