Coding↗
Random Values from a Dictionary: Frequency and Distinct Sampling
Implement a mutable dictionary with constant-time random sampling, then adapt it to sample distinct values uniformly, with tested Java and Python solutions.
hash-tablerandomizationdata-structures