liveBook · Manning

Min-heap

A min-heap is a heap-ordered tree in which each parent has no greater priority than its children, so a minimum-priority element is at the root.

How 2 Manning books explain it

Advanced Algorithms and Data Structures

A min-heap is a heap in which each parent has priority at most as high as that of its children, placing a minimum-priority element at the root.

How it is used
Uses smallest-priority retrieval for priority queues, top-k selection, and Huffman tree construction.
How deep it goes
Explains ordering choices and applications, but defers detailed heap operations and implementation mechanics.
Examples
Uses task tuples, age negation, bounded top-k retention, and frequency-weighted Huffman nodes.
What you can do after
Apply it via a priority queue to retrieve minimum priorities and maintain a bounded set of largest values.

Read how Advanced Algorithms and Data Structures explains min-heap →

Grokking Data Structures

A min-heap is a heap in which every parent has a value no larger than its children, so the root contains the smallest element.

How it is used
Uses a min-heap to extract small elements or maintain the best k candidates during a scan.
How deep it goes
Defines parent–child ordering, explains priority inversion, and applies the structure to bounded selection without detailing heap implementation.
Examples
Demonstrates six-largest selection from lottery-frequency entries using a Python heap and a custom priority function.
What you can do after
Apply a min-heap to extract small elements and solve top-k selection with bounded additional space.

Read how Grokking Data Structures explains min-heap →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.