What would be the fastest algorithm to randomly select N items from a list based on weights distribution?
I have a large list of items, each item has a weight. I'd like to select N items randomly while the items with more weight are more probable to be selected. I'm looking for the most performing idea. Performance is paramount. Any ideas?
Aucun commentaire:
Enregistrer un commentaire