Common terminology | CLRS | Diagram |
---|---|---|
Full Binary Tree | ||
Complete Binary Tree | Nearly Complete Binary Tree | |
Perfect Binary Tree | Complete Binary Tree |
Common terminology will be used below
Notation:
n
nodes,l
leaves,h
height,n_{k}
nodes at depthk
,
-
The height (depth) of a node is the number of edges on the longest simple downward path from the root to the node.
-
The height of a tree is the number of edges on the longest simple downward path from the root to a leaf.
Complete Binary Tree
-
- (where )
Perfect Binary Tree
Traversal
- Preorder: Root, Left, Right
- Inorder: Left, Root, Right
- Postorder: Left, Right, Root