There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a full binary tree?
Answer / 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 |
Does linked list allow null values?
What do you mean by separate chaining?
Differentiate between an array and an arraylist.
Describe the height term in a tree.
What is the application of queue?
How can you correct these errors?
Can arraylist have null values?
What is the height of an empty tree?
List some applications of multilinked structures?
Which is the slowest sorting algorithm?
Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements.
What is the purpose of thread?