Open aoikurokawa opened 2 years ago
Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element.
Implement KthLargest class:
Resources: https://www.youtube.com/watch?v=hOjcdrqMoQ8 https://www.youtube.com/watch?v=AE5I0xACpZs
Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element.
Implement KthLargest class: