kth-largest-add-is-log-k

Status: IN

Each `add` call performs at most one push and one pop on a heap of size k, giving O(log k) time regardless of total stream length.

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

JSON