1.

The descending heap property is ___________(a) A[Parent(i)] = A[i](b) A[Parent(i)] = A[i](d) A[Parent(i)] > 2 * A[i]This question was posed to me in exam.Question is from Heapsort topic in section Sorting of Data Structures & Algorithms II

Answer»

The correct option is (c) A[Parent(i)] >= A[i]

For EXPLANATION: The max-heap is also KNOWN as descending heap. Max-heap of SIZE n is an almost complete BINARY tree of n nodes such that the element at each node is LESS than or equal to the element at its parent node.



Discussion

No Comment Found

Related InterviewSolutions