← Amazon questions

Count integers smaller than a given number in a stream

Filed under Amazon

Given a stream of integers, implement a data structure to return the count of integers smaller than a given input x 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.