Binary heaps and priority queues
Compare priority queue operations and their suitability for bounded timer or task bookkeeping.
View lesson accessAll lessonsWhat the lesson covers
The course lesson is called What runs next?. The scheduler scans every ready task to find the most urgent one, and the timer list is re-sorted whenever a timer is added. Ravi shows a structure that always has the top item ready and costs only log n to update.
- priority queue
- binary heap
- sift up and down
- heapify
- top-K
- software timers
Before you start
Question to think about: How are equal priorities handled, and what happens when a fixed queue is full?
Preparation exercise: Define a deterministic tie-breaking rule and check empty and capacity-boundary operations.
This is an original public study prompt, not the paid lesson or its solution. The interactive course contains the walkthroughs, labs, exercises and recaps.
Read the free embedded C articles for additional practice.
Test your understanding
Practice free firmware interview questions and mock interviews · Assess your readiness