Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Smoothsort

by flexvault (Monsignor)
on Sep 19, 2015 at 19:17 UTC ( [id://1142527]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    > time perl -e '@ar[$_]=int(rand(1000)) for(0..25); print "List:   @ar
    +\n";
    @str=sort(@ar);print "Str Cmp: @str\n";
    @numr=sort{$a<=>$b} @ar;print "Num Cmp: @numr\n";'
    
  2. or download this
    List:    529 175 516 995 715 296 57 189 999 381 315 612 393 914 716 48
    +3 30 58 269 849 180 820 546 20 577 127
    Str Cmp: 127 175 180 189 20 269 296 30 315 381 393 483 516 529 546 57 
    +577 58 612 715 716 820 849 914 995 999
    ...
    real    0m0.004s
    user    0m0.004s
    sys     0m0.000s
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-03-29 04:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found