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
Discuss the difference between a stack and an Array?
Why do we use dynamic arrays?
What is array sort?
How would you reverse characters of an array without using indexing in the array.
What is the difference between for and foreach loop?
Write the advantage of separate chaining?
What type of data structure is used to perform recursion?
Questions related to arrays, such as given a 2 integer array, find the common elements.
What is the slowest sorting algorithm?
Write a Program for Linked list manipulation.
What do you mean by primary clustering?
List the applications of queues?
Can you tell me the differences between Array and ArrayList?
What is the difference between null and void pointer in data structures?
What do you mean by disjoint set adt?