Summary
Definition
Heap is a tree-based data structure. The specialty of the heap is in the ordering of the nodes.
In a heap the parent node is smaller than the child nodes(in case of min heap) or the parent is larger than the child nodes(in case of max heap).
![Heap Overview](https://bigboxcode.com/wp-content/uploads/2024/06/Heap-Overview-v2-1024x465.png)
NOTE
Types
Heaps can be of 2 types-
Use Cases
When we have a long data list, and we don’t need random access to an element, then we should use a linked list.
NOTE
Characteristics
Elements
A Heap data structure has the following info-
- Vertice(node)
- Arc(edge)
NOTES
Functionality
Code Implementations
Use the following links to check Heap data structure implementation in specific programming languages.