3 ms·
The key to why the obvious algorithm of "half a Fisher-Yates shuffle" isn't enough is that it uses O(k) memory, whereas Vitter's algorithm is constant. http://
by Jabbles 11y ago
The key to why the obvious algorithm of "half a Fisher-Yates shuffle" isn't enough is that it uses O(k) memory, whereas Vitter's algorithm is constant.
http://play.golang.org/p/UqC6XWrPLB http://play.golang.org/p/UqC6XWrPLB
- deleted 11y ago[deleted]