More on Complete Binary Trees
Explore the detailed properties of complete binary trees, including how nodes are counted by height and the rules for inserting new nodes. Understand how to maintain tree completeness by filling left subtrees before right subtrees.
We'll cover the following...
We'll cover the following...
Introduction
Previous lessons touched upon complete binary trees in the last lesson, but here are more detailed properties of them:
- All the levels are completely filled, except the last one possibly.
- Nodes at the last level are as far left as possible.
- The total number of nodes in a complete binary tree of height “h” are: . Again, this is based on the geometric series formula: