In a max-heap, element with the greatest key is always in the which node?

Category: QuestionsIn a max-heap, element with the greatest key is always in the which node?
Editor">Editor Staff asked 4 weeks ago

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 Answers
Editor">Editor Staff answered 4 weeks ago

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.