+1 vote
in Data Structures & Algorithms I by (88.2k points)
Given a heap of n nodes.The maximum number of tree for building the heap is.

(a) n

(b) n-1

(c) n/2

(d) logn

My question is based upon Binomial and Fibonacci Heap topic in chapter Heap of Data Structures & Algorithms I

I had been asked this question by my school principal while I was bunking the class.

1 Answer

+1 vote
by (672k points)
selected by
Best answer
The correct option is (a) n

Explanation: Each node could be seen as a tree with only one node and as a result maximum subtree in the heap is equal to number of nodes in the heap.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.