← Microsoft questions

Random candidate selection with uniform probability

Filed under Microsoft

Design a mechanism to select a candidate from a stream of incoming lottery ticket purchases with uniform probability, where the total number of candidates is unknown until the end.

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.