Heaps & Priority Queues

Keep the smallest or largest item ready in logarithmic time, for top-k, merging and scheduling.

  1. 01

    How a Heap Works

    • easy
    • Pro
  2. 02

    Last Stone Standing

    • easy
    • Pro
  3. 03

    Kth Largest in a Stream

    • medium
    • Pro
  4. 04

    K Closest Points to the Origin

    • medium
    • Pro
  5. 05

    Schedule Tasks with a Cooldown

    • medium
    • Pro
  6. 06

    Merge K Sorted Lists

    • hard
    • Pro
  7. 07

    Running Median

    • hard
    • Pro