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
What is the difference between array and list?
Which sorting algorithm is considered the fastest?
What is the difference between hashmap and treemap?
Write a Program for Reverse a linked list.
Provide an algorithm to reverse a linked list without using recursion.
Which is the parent class of linkedhashset class?
Write program for Bubble Sort ?
What is the application of queue?
Is arraylist synchronized?
How do you find the size of an arraylist?
What is data type and its types?
What is scalar example?
Is quicksort greedy algorithm?
what is the difference between dynamic as well as non - dynamic data structures.
What is the use of substring?