Algorithm

Here is the algorithm (assumes n even):

algorithm74

Computes min-max in pairs. Only need to compare current min to min and current max to max. How many comparisons all together?


next up previous
Next: Finding the Salutatorian Up: EXTREMALS Previous: Computing Max and Min