BTI Beyond The Interviews

DSA · 10 sections

Heaps & Priority Queues

Min/max heaps, heapify, and the priority-queue patterns behind scheduling and streaming problems.

Premium · preview 101 cards Updated 24 Oct 2026
Free to preview. The first 3 cards and the full outline are below — the rest of this sheet is part of the DSA & Data Structures bundle.

What's inside

Preview — first 3 of 101 cards

Heap definition

A complete binary tree satisfying the heap property (parent <= children for min-heap, >= for max-heap).

Min-heap property

Every parent is less than or equal to each of its children, applied recursively through the whole tree, so the root holds the global minimum. A min-heap gives O(1) min and O(log n) insert and extract.

Max-heap property

Every parent is greater than or equal to each of its children, recursively, so the root holds the global maximum. Use it for priority scheduling, top-K smallest, and ascending heap sort.

98 more cards in this sheet

Unlock the DSA & Data Structures bundle — ₹399

One-time payment. Unlocks this sheet and 8 other sheets in the bundle, plus a typeset PDF of each.

Unlock the bundle See all bundles

Or get all 76 sheets for ₹999 — one payment, every future sheet included.