bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new coreutil? shuffle - randomize file contents


From: Davis Houlton
Subject: Re: new coreutil? shuffle - randomize file contents
Date: Tue, 31 May 2005 09:23:03 +0000
User-agent: KMail/1.7.2

On Monday 30 May 2005 23:02, Frederik Eaton wrote:
> I hope that you aren't proposing an algorithm which is similar to
> card-shuffling. That would be exactly like merge-sorting on a key hash
> - i.e. no more efficient.

Agreed! The algorithm implemented is a slight variation on Knuth's shuffle 
algorithm--instead of randomizing a list into another list, we randomize 
directly to output--and is linear O(n).  

Thanks,
   Davis




reply via email to

[Prev in Thread] Current Thread [Next in Thread]