i am trying to figure a algorithm problem that determines the two largest number of the a series of random 10 numbers. Thanks to your help.
algorithm of determines the two largest of a series
-2
$\begingroup$
algorithms
-
1You said a 'series' not a sequence or a list. Are there any known properties of this series? – 2010-12-26
-
1If you mean `series`,please state whether we can assume that it have some specific properties,if it is sequence then change the question accordingly. – 2010-12-26
-
2does the algorithm need to perform in a specific way? Does it need to be < O(n lg n)? If not, just sort it the list and pick the last 2 elements. – 2010-12-26
-
0@Sev: you're joking, right? Tell me you're joking... – 2010-12-26
-
1well, considering the form of the question, i was :) – 2010-12-26