chevron_leftTrees All topics

Heap & Priority Queue

A heap is a binary tree with one rule: every parent is bigger than its children (a max-heap). That means the biggest value is always sitting right at the top, ready to grab.

step 01/22

  • comparing
  • moving
  • target · placed
  • on the path

Practice

spec · json ↗