{"id":"kth-largest-heap-size-invariant","text":"After `__init__` and every `add` call, `len(self.heap) <= self.k` holds unconditionally — the bounded min-heap never grows past k elements.","truth_value":"IN","source":"entries/2026/06/06/kth-largest-element-in-a-stream-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"kth-largest-heap-size-invariant","truth_value":"IN","reason":"premise"}]}}