Two Heaps & K-Way Merge
Two heaps that lean on each other, and one that merges k sorted streams.
Two Heaps & K-Way Merge progress0 / 4
- Two Heaps: Running MedianTwo heaps face each other, and the middle sits between their roots.6m
- K-Way MergeOne heap of k heads turns k sorted lists into one.6m
- Top K in a StreamCount once, then let a k-sized heap keep only the winners.6m
- Sliding Window MedianYou cannot dig a value out of a heap — so mark it dead instead.7m
Quiz yourself: 3 questions from this module
1 / 3