First k smallest numbers in a stream
Filed under Samsung
The question
Given an integer k and a continuous stream of integers, print the first k smallest numbers encountered at each moment.
No write-up yet. Related questions below have one.
Related Samsung questions
Collected from public candidate posts and coding forums. Updated Nov 2026.