0

Heap / Priority Queue

Partially ordered complete tree that hands you the extreme element instantly.

Newinterview weight 7015 problems2 visualisers
18
mastery
Attempts logged
0
Predicted success on the next one
33%
Solved here
0 / 15

What you actually need to hold in your head

  • Array backed, children sit at 2i+1 and 2i+2
  • Top K with a heap of size K
  • Two heaps track a running median
  • Heapify builds in linear time
Comfortable with these first
This unlocks
Next in the path
Graphs

Watch it run

Step through the algorithm before you write it.

Patterns in this topic

The trigger phrases are what you are training yourself to notice.

Heap / Priority Queue problems

Ordered by sheet phase, so the early ones are the highest signal.

0 / 15 solved
1
HHeap / Priority Queue
2
MHeap / Priority Queue
3
MHeap / Priority Queue
4
MHeap / Priority Queue
5
MHeap / Priority Queue
6
MHeap / Priority Queue
7
MHeap / Priority Queue
8
EHeap / Priority Queue
9
MHeap / Priority Queue
10
MHeap / Priority Queue
11
EHeap / Priority Queue
12
HHeap / Priority Queue
13
HHeap / Priority Queue
14
MHeap / Priority Queue
15