"be consistent" | |
PerlMonks |
Re: How to find the N largest values in an array?by fundflow (Chaplain) |
on Oct 04, 2001 at 14:45 UTC ( [id://116673]=note: print w/replies, xml ) | Need Help?? |
The N largest values can be found in O(n) in the following way:
* to be more precise, this is O(K*n)
In Section
Seekers of Perl Wisdom
|
|