Re: An Applied Algorithmic Activity:
- Posted by Patrick Barnes <mrtrick at gmail.com> Jun 30, 2004
- 463 views
> is this a function - which is from Jiri Babor - which might be helpful > for you?: > > function shuffle(sequence s) > object temp > integer j > > for i = length(s) to 2 by -1 do > j = rand(i) > temp = s[j] > s[j] = s[i] > s[i] = temp > end for > return s > end function Unfortunately no, because of the randomness in it. The thing needs to be reproducible again. -- MrTrick