← Back to All Algorithms
🔺 Binary Max-Heap
Heap Property
Max-Heap: Parent ≥ Children (root is maximum)
Array Representation:
- Parent of i: ⌊(i-1)/2⌋
- Left child: 2i + 1
- Right child: 2i + 2
Array Representation
Max-Heap visualization. Try inserting or extracting!