Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1

by Tux (Canon)
on Feb 06, 2019 at 10:58 UTC ( #1229463=note: print w/replies, xml ) Need Help??


in reply to Re^2: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1
in thread Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1

You might not have run this with DO_CHECK *on*, as your lists sort like 1 2 3 4 5 0 -5 -4 -3 -2 -1: Your 0 ends up in the middle instead of at the start.


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^4: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1
by hdb (Monsignor) on Feb 06, 2019 at 11:13 UTC

    I did, that's why I said it fails if there is a zero in the data. I am still thinking whether it can be saved in some way without extra checks for zero.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1229463]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2021-10-21 01:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (82 votes). Check out past polls.

    Notices?