Courses / Data Structures and Algorithms
20. Heaps
Understanding heap data structures and their properties.
1 min read Chapter 20 of 23
Python
Heaps
A heap is a special tree-based data structure that satisfies the heap property.
"I need to efficiently manage a priority queue for my tasks."
A heap is a binary tree where the parent node is either greater than or equal to (max-heap) or less than or equal to (min-heap) its children, allowing for efficient priority-based retrieval.
"I need to efficiently manage a priority queue for my tasks."
A heap is a binary tree where the parent node is either greater than or equal to (max-heap) or less than or equal to (min-heap) its children, allowing for efficient priority-based retrieval.