+1 vote
in Data Structures & Algorithms I by (88.2k points)
The ascending heap property is ___________

(a) A[Parent(i)] =A[i]

(b) A[Parent(i)] <= A[i]

(c) A[Parent(i)] >= A[i]

(d) A[Parent(i)] > 2 * A[i]

My doubt is from Heap in portion Heap of Data Structures & Algorithms I

I have been asked this question in unit test.

1 Answer

+2 votes
by (672k points)
selected by
 
Best answer
Right answer is (b) A[Parent(i)] <= A[i]

Best explanation: The min heap is also known as ascending heap. Min heap of size n is an almost complete binary tree of n nodes such that the element at each node is greater than or equal to the element at its parent node.

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.

Categories

...