Min Heap and Max Heap

Home > Computer Science > Algorithms and data structures > Heaps > Min Heap and Max Heap

Min heap is a binary heap where the parent nodes have a smaller key than the children. A max heap is the opposite: parent nodes have a larger key than the children.