Although that "push" line is quite interesting. perl++
The "push" line isn't the punchline. The punchline is how you calculate $low for the splice, which amounts to 7 iterations of the while loop for the sample data. Then, the array reordering is done with one fell swoop. Takes some time to grok that. tybalt89++
In reply to Re^2: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1
by shmem
in thread Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1
by haukex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |