in reply to Re^2: Sorting challenge (Insertion sort)
in thread Sorting challenge
FWIW: this passed with a time of 4.56s. The main difference between this and failing attempts -- besides the correction for dups -- is preallocation of the array size:
$max = <>; $#n = $max; ++$n[ $_ ] while <>; defined $n[$_] and print "$_\n" x $n[$_] for 0 .. $#n; exit 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Sorting challenge (Insertion sort)
by davido (Cardinal) on Jul 24, 2013 at 14:20 UTC | |
by BrowserUk (Patriarch) on Jul 24, 2013 at 14:35 UTC | |
by choroba (Cardinal) on Jul 24, 2013 at 15:00 UTC | |
by BrowserUk (Patriarch) on Jul 24, 2013 at 15:17 UTC | |
by davido (Cardinal) on Jul 24, 2013 at 22:27 UTC | |
by BrowserUk (Patriarch) on Jul 24, 2013 at 22:48 UTC |