Lesson 3 of 4Module 2 · 0% of course
Data Structures & Algorithms · Core algorithms

Heaps & priority queues

A heap always hands you the smallest (or largest) item in O(log n). It powers schedulers, top-K queries, order matching and Dijkstra.

25 min · 7 steps · videoJump to quiz ↓
8. Binary Heaps MIT OpenCourseWare · 30 min
Open in YouTube
Step 1 of 7 · Overview25 min read ·
Key idea
Prereqs: Big-O, Sorting & binary search. Next: Graphs & BFS. MIT 6.006 Lecture 8 (Binary Heaps).
Next: 1. The problem a heap solves
‹ PrevNext ›