1/49
Loading...
🌳Create Max Heap
Create an empty max heap. Parent nodes are always greater than children.
🔒
Loading...
Create an empty max heap. Parent nodes are always greater than children.
A Heap is a complete binary tree where "parent is always greater (max-heap) or smaller (min-heap) than children". This rule ensures the root always contains the maximum (or minimum) value.