make it clear this way:

来源: 2008-02-13 19:40:44 [旧帖] [给我悄悄话] 本文已被阅读:

1) temp1 & temp2: initialized
2) Then pair comparation。For instance, a1&an, a2&an-2…ai&an-1 n/2 times
3) when each pair comparation ,if the larger >temp1,->temp1,n/2 times; if the smaller <temp2,->temp2,n/2 times;
so total=3/2n