← Amazon questions

Find Closest 1 Million Stars to the Sun

Filed under Amazon

You are given a stream of billions of stars, each represented by its distance from the Sun. Efficiently find the 1,000,000 closest stars. Because the total number of stars is too large to fit in…

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.