Hudson River Trading

Interview Question

Algorithm Developer Interview
Hudson River Trading

Design a data structure that supports push() and randompop() operations. Additionally, modify the data structure to support push() and weighted_randompop(), where the probability of popping an element is proportional to its assigned weight.

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!