• Insert: Add a value into the heap one at a time using the bottom-up approach. The new element is added at the end and bubbles up to maintain heap property.
  • Extract: Remove and return the minimum value (root) from the heap, then restore heap property by bubbling down.
  • Build: Construct a heap from a pre-filled array using the efficient top-down heapify approach. This fills the array with descending values, then applies push-down operations starting from the last non-leaf node, working backwards to the root. This demonstrates the O(n) build heap algorithm.
  • Reset: Clear the entire heap to start fresh.
Observations