Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Better mousetrap (getting top N values from list X)

by BrowserUk (Patriarch)
on Feb 02, 2005 at 05:27 UTC ( [id://427155]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub top_x {
        my( $n, $aref ) = @_;
    ...
        }
        return @topN[ 0 .. $n ];
    }
    
  2. or download this
    void topN( int n, AV*data ) {
        int *topN;
    ...
        Safefree( topN );
        Inline_Stack_Done;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 02:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found