← FactSet questions

Print elements from stream in sorted form using minimal memory

Filed under FactSet

Given a finite stream of integers strictly between 0 and 15, print the present integers in sorted form using only 2 bytes (16 bits) of space.

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

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