Tools / Data structures Interview questions
Explain Heap data structure.
A heap is a specialized tree-based data structure that satisfies the heap property that If 'A' is a parent node of 'B', then the key (that is, value) of node A is ordered with respect to the key of node B with the same ordering strategy applyed across the heap.
Heap data structure is always a Binary Tree.
A heap can be of two types, max heap and min heap.
More Related questions...