Solutions if Unsorted

If L is not sorted, we can sort it in $O(n \log n)$... but for max, min, and midpoint we'd expect O(n) to suffice.

We'll see that O(n) is all we need for median as well!


next up previous
Next: MEAN Up: COMPUTING STATISTICS Previous: Solutions by Sorting