has anyone done a lotterysort? something like:

array lotterysort(array a) {
        forever {
                array b = randomize(a)
                int i = 1
                while (b[i] > b[i-1] && i < size(b))
                        i++
        
                if (i >= size(b)) return b
        }
}

> references: 
>       http://home.tiac.net/~cri/2001/badsort.html
>       http://www.iq0.com/duffgram/silly.c
> 
> - erik
> 
> On Sat Mar 18 08:05:10 CST 2006, [EMAIL PROTECTED] wrote:
> 
>> actually i think rtl ends up doing this: (quoted from tom duff's
>> sillysort)

Reply via email to