I have no reputation for a comment on @PeterLawrey's answer:Random weighted selection in Java. It is good. But now I call next() get a result as A and want to remove weight for A from map to avoid to get A again. How can I deal with it?
next()
map
Aucun commentaire:
Enregistrer un commentaire