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 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why we need cursor implementation of linked lists?

655


Why hashtable is faster than arraylist?

610


Does the minimal spanning tree of a graph give the shortest distance between any 2 specified nodes?

627


How does hashset work internally in java?

605


What is Insertion sort, selection sort, bubble sort( basic differences among the functionality of the three sorts and not the exact algorithms)?

594






What are the benefits of using arrays?

588


How can we delete the first node from the singly linked list?

565


What are the different types of sorting? Explain the difference between them.

696


Why do we use hashset?

555


What are skew trees? For a tree with 4 nodes draw all possible binary? Generalize for n nodes how many binary trees can be drawn?

704


What do you know about the big-o notation and can you give some examples with respect to different data structures?

588


Which is faster binary or linear search?

558


Define rehashing?

711


How are the elements of a 2d array are stored in the memory?

689


Which interfaces are implemented by enumset?

571