which of the following is a true about binary trees
a) every complete binary tree is also a full binary tree.
b) every full binary tree is also a complete binary tree
c) no binary tree is both complete and full.
d) none of above
Answers
Answered by
0
Answer:
Explanation:
A full binary tree (sometimes proper binary tree or 2-tree or strictly binary tree) is a tree in which every node other than the leaves has two children.
A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible.
Answered by
0
(d) none of the above.
Definition of binary tree;
The Binary tree signifies the nodes can have maximum two children. They can have either 0,1, or 2 children.
Types of binary trees;
- Full Binary tree- It is called as strict binary tree. The full binary tress contains either 0 or 2 children.
- Complete Binary tree- the nodes are completely filled expect the last level.
- Perfect Binary Tree- A tree is a perfect binary tree where the internal nodes have 2 children, and all the leaf nodes are at the same level.
- Balanced binary tree- the term itself suggest the balance between the left and right trees by the level 1.
Features of Binary trees;
- These trees are categorized as '2'. They do not hold any duplicate values.
- The one node is known as root of the tree that has no parent node. All other nodes have exactly one parent.
- A parent has two child nodes; the left child and right child. This helps them to differentiate between Binary trees and the others.
Uses of Binary Trees;
- They are mainly used for searching and sorting. They allows the data sore hierarchically. They used to store as many nodes as possible, the faster linked lists and slower arrays when comes to accessing elements.
- The data are moved and hold in a flexible manner allows a structural relationships that exist in the given data set.
Therefore, Binary Tress have their own characteristics that allows them to differentiate with other trees. They are neither full Binary, complete nor both.
Similar questions