Since your node has gone nearly unreplied so far, I thought I should at least throw something out there. I really like this algorithm. It has a nice, intuitive feel. The Fisher-Yates may be preferable in many cases, but this one is still rather nice in and of itself. Nice post!
Update: upon re-reading, it seems I used "nice" a bit too much in this post. Please substitute appropriate synonyms as you read it. :-)
In reply to Re: Yet Another Fair Shuffle Node
by Mugatu
in thread Yet Another Fair Shuffle Node
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |