← Amazon questions

Find k smallest elements in a continuous stream of integers

Filed under Amazon

Given an unbounded continuous stream of incoming integers, maintain and output the k smallest elements seen so far at any point in time.

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 Amazon questions

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