XP is just a number  
PerlMonks 
Re: Re: largest number inside array/hashby TomDLux (Vicar) 
on Apr 07, 2004 at 07:35 UTC ( #343209=note: print w/replies, xml )  Need Help?? 
Think back to second year of college, when you took that Algorithms course. A good sort such as quick sort is O( N logN ), poor ones such as bubble sort are O( N^2 ). A max() function requires a single pass through the list, and so is O( N ). It would be silly to do N log N  N ( i.e. N (log N  1) ) operations more than you need to. 
In Section
Seekers of Perl Wisdom

