Binary Heaps are complete binary trees where parent nodes satisfy min-heap or max-heap invariants. Master std::priority_queue, top-K elements extraction, median finding streams, and K-way sorted merges in C++.
Heap Property: Max-heap keeps root largest; Min-heap keeps root smallest.
Top-K Optimization: Use min-heap of size K to find K largest elements in O(N log K).
Dual-Heap Median Stream: Combines max-heap (lower half) and min-heap (upper half) for O(1) median access.
K-Way Array Merge: Min-heap of size K merges K sorted arrays in O(N log K).