InterviewSolution
Saved Bookmarks
| 1. |
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 treeThis interesting question is from Heap topic in portion Heap of Data Structures & Algorithms II had been asked this question in a national level competition. |
|
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. |
|