Heap

M32_33

A heap is a specialized full binary tree in which every parent node contains greater than equal to (Max-Heap) or less than equal to (Min-Heap) than its child nodes. And last leaf node can be alone. Priority queue is a variant of queue data structure in which insertion is performed in the order of arrival and deletion is performed based on the priority.