I have to generate a password with 2 random strings chosen from a list of string.
After few research I found the reservoir sampling algorithm that seems to quite solve the problem.
But here is my question :
Why should I pick the reservoir sampling algorithm when I can just generate two random number, and then read the line associated with those number ?
Thank you !
Aucun commentaire:
Enregistrer un commentaire