in reply to getting the highest value in a simpler way
If you don't have such a loop, don't worry too much. The module suggested or what you are doing is fast enough. After all, searching for max or min in an unsorted list takes O(n) time. Oh, and btw, dont' think of sorting before hand unless you want it sorted for other reasons, as that is in the realm of O(n lg n) time.for( a bunch of values ) { mutual = complexCalculation(); max = mutual if( max < mutual or max = 0 ); }
----
Then B.I. said, "Hov' remind yourself
nobody built like you, you designed yourself"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: getting the highest value in a simpler way
by davido (Cardinal) on Nov 10, 2004 at 18:17 UTC | |
by riffraff (Pilgrim) on Nov 10, 2004 at 19:07 UTC | |
by davido (Cardinal) on Nov 10, 2004 at 19:28 UTC | |
by exussum0 (Vicar) on Nov 10, 2004 at 20:35 UTC |