Build the PrimitiveMedium
Kth Largest in a Stream
Values arrive one at a time and never stop. After each arrival, report the kth largest value seen so far.
Implement a `KthLargest` class:
- `KthLargest(k)` — construct for a fixed k.
- `add(value)` — record a value and return the current kth largest, or `None` if fewer than k values have been seen.
You cannot store the whole stream. Memory must depend on `k`, not on how long the stream runs — and be ready to explain why the heap you reach for holds the *smallest* of the values you care about.
What to expect: A timer starts when you begin. Edit the starter code, run it against the test suite as many times as you like, then finish when you're done. The reference solution and interviewer follow-up questions unlock only after you finish.