There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a full binary tree?
Answer Posted / rohit sah
15.
In general:
There are 2n-1 nodes in a full binary tree.
By the method of elimination:
Full binary trees contain odd number of nodes. So there cannot be full binary trees with 8 or 14 nodes, so rejected. With 13 nodes you can form a complete binary tree but not a full binary tree. So the correct answer is 15.
Note: Full and Complete binary trees are different. All full binary trees are complete binary trees but not vice versa.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Which of the collections allows null as the key?
What is the use of prototype?
What is unhashable type list?
What are types of Collision Resolution Techniques and the methods used in each of the types?
Define threaded binary tree. Explain its common uses
Advanced problems related to Data Structures were asked
What does isempty() member method determines?
How do you reference all the elements in a one-dimension array?
How to pass in data structure exam?
Write code for reversing a linked list.
Define linear data structures?
Mention for which header list, you will found the last node contains the null pointer?
How much time does it take to learn data structures?
What is the difference between hashset and arraylist?
Is it possible to increase size of array?