Citadel

Interview Question

Software Developer Intern Interview
Citadel

Design an algorithm to randomly select people in a city such that the probability of selecting someone from a given district is proportional to the district's population size. Additionally, discuss how you would test your implementation and optimize its runtime, considering repeated calls to the selection function with an acceptable error margin.

Unlock the Full Solution

Enter your email to get instant access to the complete solution, explanation, and similar practice problems.

Insights on 100+ quant firms, understand where to apply, and maximize your chances.

Get the official 2025 QB Quant Firm Tier List

Check your email inbox — you should get the interview in 1-2 minutes!