5 Levels of Generating Weighted Random Numbers in Python
Ace your algorithm interviews like a tech lead
Published in
4 min readAug 9, 2021
To get a random number in Python is simple, since there is a built-in module called random
. But how about weighted random numbers?
Let’s see a real interview question: