> This algorithm has the consequence that the biggest weight entries
> appear more at the end, since each key has the same probability of
> being chosen. If you want weighted appearance, you should weigth the
> random choosing with the counts.

Or to combine the two ideas, weight the die with the values from the hash.

k