juniorHeaps and Maps
What is a Binary Heap?
Updated Apr 28, 2026
Short answer
A complete binary tree that satisfies the heap property (Min-Heap or Max-Heap).
Deep explanation
Heaps and Maps are fundamental for optimization. A complete binary tree that satisfies the heap property (Min-Heap or Max-Heap). Heaps are used for priority management, while Maps provide constant-time data retrieval.
Real-world example
Priority queues in operating systems.
Common mistakes
- Confusing a Heap with a sorted array.
Follow-up questions
- Is a Heap a sorted structure?