A Full Binary Tree is an important type of binary tree in which every node has either zero or two children. It is also known as a Proper Binary Tree, Strict Binary Tree, or 2-Tree. In this chapter, we will learn the definition, properties, and important theorems of a Full Binary Tree, along with the relationships between internal nodes, leaf nodes, and total nodes.
This chapter covers What is a Full Binary Tree, Properties of a Full Binary Tree, Full Binary Tree Theorems, Relationship Between Internal and Leaf Nodes, Relationship Between Internal and Total Nodes, and Maximum Nodes in a Binary Tree.
A Full Binary Tree is a binary tree in which every node has either zero or two children. Therefore, no node in a Full Binary Tree has exactly one child. Nodes having two children are called internal nodes, while nodes having no children are called leaf nodes. For example, if a tree contains a root node with two children and each child either has two children or no children, the tree is a Full Binary Tree.

A Full Binary Tree follows several important mathematical relationships. If a non-empty Full Binary Tree contains I internal nodes, L leaf nodes, and N total nodes, then the number of leaf nodes is L = I + 1. The total number of nodes is N = 2I + 1, while the number of internal nodes can be calculated as I = (N - 1) / 2. Similarly, the number of leaf nodes can be calculated using L = (N + 1) / 2, and the number of internal nodes can also be expressed as I = L - 1. The total number of nodes can therefore be calculated as N = 2L - 1.
Let I represent the number of internal nodes, N represent the total number of nodes, L represent the total number of leaf nodes, and λ represent the number of levels in the tree. In a Full Binary Tree, the number of leaf nodes is I + 1, and the total number of nodes is 2I + 1. The number of internal nodes is (N - 1) / 2, while the number of leaf nodes is (N + 1) / 2. Similarly, when the number of leaf nodes is known, the total number of nodes is 2L - 1, and the number of internal nodes is L - 1.
For a binary tree containing λ levels, the maximum possible number of nodes is 2^λ - 1. The maximum possible number of leaf nodes at the last level is 2^(λ - 1). These formulas are useful when determining the maximum size of a binary tree based on its number of levels.
Output:
Preorder Traversal of Full Binary Tree: 1 2 4 5 3 6 7
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India