Closed Drup closed 8 years ago
The implementation of shuffle is not great, but for perfect shuffle, I don't see any other solution. There is a nice algorithm for lazy (or weighted) sampling, but it needs a heap.
The implementation of shuffle is not great, but for perfect shuffle, I don't see any other solution. There is a nice algorithm for lazy (or weighted) sampling, but it needs a heap.