Kth Largest Element in a Stream
Maintain the k-th largest value of a stream. Start with an initial array, then after each added number print the current k-th largest.
Constraints
1 <= k <= n + m
Discussion
No discussions yet.
Join Shalyam Newsletter
Get exclusive insights with every issue: education, research and innovation news.
Shalyam Support
Hi! Ask us anything โ we'll reply on WhatsApp or Telegram within 24 hours.