Design dynamic weighted random sampling with updates | Citadel Coding Question