Infosys Interview Question

What is heap?

Interview Answer

Anonymous

Nov 5, 2015

Heap is a specialized tree-based data structure that satisfies the heap property: If A is a parent node of B then the key of node A is ordered with respect to the key of node B with the same ordering applying across the heap.Heaps can be classified further as either a "max heap" or a "min heap".