โ† Microsoft questions

Remove duplicates from 1 billion numbers in O(n)

Filed under Microsoft

Given an array of 1 billion integers where each value is in the range [1, 10^5], remove all duplicates and return the unique elements in O(n) 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 Microsoft questions

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