How do I have a HashSet pick a random element from itself?
Printable View
How do I have a HashSet pick a random element from itself?
I guess you could convert it to an array with toArray(), then pick a random index out of the array.
Simplicity is prerequisite for reliability...
E. Dijkstra