["KthLargest", "add", "add", "add", "add", "add"]
[[3, [4, 5, 8, 2]], [3], [5], [10], [9], [4]]4 5 5 8 8
And since we bound the heap size to be equal to k after every query, this top element would be the Kth largest in the overall
*;
class comp implements Comparator4 5 5 8 8
O(N + Q), where N = size of the initial array (while calling the constructor).
when modification to BST…Find Top K (or Most Frequent) Numbers in a StreamFind Largest d in Array such that a + b + c = dLargest subarray with equal number of 0s and 1sLength of the largest subarray with contiguous elements