Heaps & Priority Queues Checkpoint

Work fresh traces, diagnose invalid implementations, and identify model boundaries.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. What is the third-largest value in [7,2,9,7,4], counting duplicates?
2. A size-3 min-heap currently contains the three largest values seen, with root 5. The next value is 2. What should happen?

Select one answer.

3. To merge sorted lists, a node is removed from the heap. Which new candidate should normally be inserted?

Select one answer.

4. For frequencies {a:5,b:2,c:4,d:1}, what is the second-highest frequency?
5. A top-k-frequency problem specifies value order as a tie break. What must the heap comparator encode?

Select one answer.

Join Discord