k-th largest after each arrival
Write kth_largest_stream(nums, k) that returns a list with, for each position i, the
k-th largest value among nums[0..i], or None when fewer than k values have
arrived.
kth_largest_stream([4, 5, 8, 2], 3) -> [None, None, 4, 4]
kth_largest_stream([3, 1], 1) -> [3, 3]
The point is to practise maintaining a heap of size k across a stream.
def kth_largest_stream(nums, k):
...