A heap is a special case of a binary tree, in which the top node is compared with its child nodes and their values and arranged accordingly.
An example of minimum heap attribute is
- Minimum heap: The father's key is less than or equal to his child's key. The root will contain the minimum value of the heap.
- Maximum heap: The key of the parent item is greater than or equal to the key of its child. This is called the maximum heap attribute. The root will contain the maximum value of the heap.
It is used to implement priority queues, because priority values can be sorted according to heap attributes, and arrays can be used to implement heaps.
Related Article
Fixed income
Digireload TeamIf you are the kind of investor who does not want to gamble much, you must invest in Fixed Income mutual funds. These kinds of mutual funds offer l...
Jaisalmer
Digireload TeamJaisalmer is a major tourist spot located in the northwestern state of Rajasthan in India. It is known as the 'golden city' due to its boun...
Full Stack Development
Digireload TeamFull-stack improvement alludes to the advancement of both customer-side and server-side programming and will undoubtedly be one of the top moving a...








.png)