Engrain by ByteRush

DSA.03.06 Mid-levelCore — asked often

Heaps and priority queues

Comes up in: DSA, Coding

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • binary heap in an array
  • sift up/down
  • heapify O(n)
  • priority queue API
  • why JS needs your own

Words you will know

heappriority queueheapify

What you will practise

  • implement MinHeap with comparator

Interview questions this answers

  • How is a binary heap stored in an array?