Design a class that tracks the kth largest element in a stream of integers. It is created with k and an initial list of numbers; each call to add(val) inserts a value and returns the current kth…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.