It is an in-place sorting technique that has no quadratic worst-case running time. Heap is a special tree-based data structure and all nodes are either >= or <= each of its children.