← Flipkart questions

Average of top K numbers in stream

Filed under Flipkart

Given an infinite stream of integers, maintain and return the average of the largest K numbers seen so far. As each new number arrives, the system should be able to provide the updated average of the…

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.