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.
--
TTTATCGGTCGTTATATAGATGTTTGCA
In reply to Re: Re: largest number inside array/hash
by TomDLux
in thread largest number inside array/hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |