1Python's `heapq` is a min-heap. For max-heap, push negative values: `heapq.heappush(h, -val)`.
2For "top K largest", maintain a min-heap of size K — pop when size exceeds K. The root is always the Kth largest.
3Push tuples `(priority, value)` to heap for custom ordering — Python compares tuples lexicographically.
4Running median: use a max-heap for the lower half and a min-heap for the upper half; keep sizes balanced.