+1 vote
in Data Structures & Algorithms I by (88.2k points)
In a max-heap, element with the greatest key is always in the which node?

(a) Leaf node

(b) First node of left sub tree

(c) root node

(d) First node of right sub tree

This interesting question is from Heap topic in portion Heap of Data Structures & Algorithms I

I had been asked this question in a national level competition.

1 Answer

+1 vote
by (672k points)
selected by
Best answer
Correct option is (c) root node

The best explanation: This is one of the property of max-heap that root node must have key greater than its children.

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.