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).
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.