← Flipkart questions

Stream of numbers returning max n elements in a window

Filed under Flipkart

Design a data structure that processes a stream of numbers and efficiently returns the top n maximum elements at any point. Then, adapt the approach for a sliding window to evict elements that fall…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Flipkart questions

Collected from public candidate posts and coding forums. Updated Nov 2026.