kth-largest-heap-size-invariant

Status: IN

After `__init__` and every `add` call, `len(self.heap) <= self.k` holds unconditionally — the bounded min-heap never grows past k elements.

Source: entries/2026/06/06/kth-largest-element-in-a-stream-solution.md

JSON