← Back

Heap Theory

Insertion bubble-up; removal bubble-down maintaining property.

heaptheoryUpdated 2025-09-01

Complexity

  • Insert O(log n)
  • Extract O(log n)

Build

  • Heapify O(n)