Leetcode 703. Kth Largest Element in a Stream
Maintain the kth largest element in a dynamic stream: implement a class initialized with k and an initial array that supports add(val) and returns the current kth largest after each insertion. Expect up to 10^4 add operations, so updates must be more efficient than resorting the whole list each time.
Asked at:
MicrosoftCloudKitchens
C
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Early February, 2026
Senior
The question was exactly to print the top K largest elements in a data stream and the follow up was to find the median of the stream.
Early June, 2025
C
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.