Heaps & Priority QueuesBinary heaps from first principles to production — top-K, streaming medians, and scheduler design.