K'th largest element in a stream
Given an infinite stream of integers, find the Kth largest element at any point of time. Note: Here we have a stream instead of a whole array and we are allowed to store only K elements. Examples: Input: stream[] = {10, 20, 11, 70, 50, 40, 100, 5, . . .}, K = 3Output: {_, _, 10, 11, 20, 40, 50, 50, . . .} Input: stream[] = {2, 5, 1, 7, 9, . . .}, K