From: "Simon Kröger" Date: 2005-10-19T06:43:55+09:00 Subject: Re: AND THE WINNER IS... [WAS] Re: How to get non-unique elements from an array? Ara.T.Howard wrote: > On Wed, 19 Oct 2005, Ryan Leavengood wrote: > [...] > it's interesting to note their solutions are an order of magnitude > better that > the next fastest and __5__ orders of magnitude better than the worst. > defintitely a strong argument to always consider re-working algoritms > before > using the c compiler and extconf.rb in anger. > > regards. > > -a Hmm, it doesn't effect the winners, but i would still like to mention that for a random testset i get these results: david [11, 34, 36, 37, 0, 33, 23, 9, 16] jeff [34, 34, 36, 37, 36, 33, 36, 34, 0, 37, 37, 23, 9, 16, 11, 11] jegII [34, 36, 37, 33, 0, 23, 9, 16, 11] markvh [34, 36, 37, 33, 0, 23, 9, 16, 11] martin [16, 11, 0, 33, 23, 34, 36, 9, 37] paolo [34, 36, 37, 33, 0, 23, 9, 16, 11] park [16, 33, 0, 11, 23, 34, 36, 9, 37] paul ["0", "9", "11", "1", "16", "23", "33", "34", "36", "37"] robert [16, 33, 0, 11, 23, 34, 36, 9, 37] samk1 [16, 33, 0, 11, 23, 34, 36, 9, 37] samk2 [11, 34, 36, 37, 0, 33, 23, 9, 16] simonk [11, 34, 36, 37, 0, 33, 23, 9, 16] simons [34, 34, 36, 37, 36, 33, 36, 34, 0, 37, 37, 23, 9, 16, 11, 11] zach [34, 36, 37, 33, 0, 23, 9, 16, 11] which are at least 3 different 'solutions' (simons & jeff 16, paul 10, all others 9) ok, simons and jeff can be fixed by a simple 'uniq', pauls seems to be broken (or made for other data?) cheers Simon