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
Yii Framework
Digireload TeamYii is a pure Object-Oriented Programming (OOP) framework. Yii is an open-source PHP framework for developing modern web applications rapidly and i...
Focus on Customer Retention, Loyalty and Advocacy
Digireload TeamRecurring customers are more valuable than new customers. Studies have found that it costs five times as much to attract a new customer as it does ...
CoinDCX
Digireload TeamCoinDCX is another leading crypto exchange app in India. It provides the highest liquidity in India and lets users trade in a whopping 200+ cryptoc...








.png)