Heap definition
A complete binary tree satisfying the heap property (parent <= children for min-heap, >= for max-heap).
DSA · 10 sections
Min/max heaps, heapify, and the priority-queue patterns behind scheduling and streaming problems.
A complete binary tree satisfying the heap property (parent <= children for min-heap, >= for max-heap).
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.
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.
What's new and the interview questions people are actually getting asked. No spam.