Types of Binary Trees
Types of Binary Trees
A rooted binary tree is a binary tree that satisfies the following 2 properties-
It has a root node.
Each node has at most 2 children.
Example-
2. Full / Strictly Binary Tree-
A binary tree in which every node has either 0 or 2 children is called as a Full binary
tree.
Full binary tree is also called as Strictly binary tree.
Example-
Here,
First binary tree is not a full binary tree.
This is because node C has only 1 child.
A complete binary tree is a binary tree that satisfies the following 2 properties-
Every internal node has exactly 2 children.
All the leaf nodes are at the same level.
Example-
Here,
First binary tree is not a complete binary tree.
This is because all the leaf nodes are not at the same level.
Example-
Here,
First binary tree is not an almost complete binary tree.
This is because the last level is not filled from left to right.
A skewed binary tree is a binary tree that satisfies the following 2 properties-
All the nodes except one node has one and only one child.
The remaining node has no child.
OR
A skewed binary tree is a binary tree of n nodes such that its depth is (n-1).
Example-