Programming
Heap Visualizer — Min-Heap / Max-Heap
Visualize min-heaps and max-heaps as complete binary trees stored in arrays. Watch bubble-up and heapify-down swaps.
Controls
Pick an operation, then execute and step through.
Heap (min-heap)
Root: —Array representation is the “real” storage model for heaps.
Empty heap
Code-like representation
Connect the visual model to what you’d write in code.
min-heap array: []
Step-by-step explanation
Watch intermediate reasoning, not just the final result.
Choose an operation and click Execute to generate steps.
Teaching notes
Short, beginner-friendly reminders.
Learning mode
A heap is a complete binary tree stored in an array.
Min-heap: smallest at root. Max-heap: largest at root. Insert uses bubble-up; remove root uses heapify-down.
Operation history
Track what you tried and what happened.
No operations yet.
Data Structures Visualizers
Explore the family of visualizers.
Runs in your browser
This tool processes your input on your device. Files you select are not uploaded to MuhammadLab.
Related tools
Priority Queue Visualizer — Serve By Priority
Learn how priority queues serve next items by priority (min/max) with history and explanations.
Binary Search Tree Visualizer — Insert, Search, Delete
See BST ordering rules and highlight insertion/search paths and deletion cases step by step.
Big-O Complexity Explainer — Time & Space
Compare O(1) to O(n!) with exact step counts, times and a growth chart, and measure the complexity of your own code.