Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Create unique array --the hard way!

by hdb (Monsignor)
on Mar 07, 2014 at 19:00 UTC ( #1077442=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub quick_sort {
        my @a = @_;
    ...
    my @a = (4, 65, 2, -31, 0, 99, 83, 782, 1);
    @a = quick_sort @a;
    print "@a\n";
    
  2. or download this
    quick_sort(grep $_ < $p, @a), $p, quick_sort(grep $_ > $p, @a);
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2020-08-09 11:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (54 votes). Check out past polls.

    Notices?