Bernie,
A full-blown bubble-sort can indeed be used to re-order a list into ascending or descending order. And, as you say, it can be terribly inefficient.
However, if you set the bubble-sorter to re-order into descending order, and then only allow one-pass through the bubble-sorter, then you have what we have produced... the greatest value.
If you set the bubble-sorter to re-order into ascending order, and then only allow one pass through the bubble-sorter, then you have the opposite effect... the least value.
Either of those cases is extremely efficient.
A bubble-sorter, cut-down in the prime of its life (after one-pass), was still a bubble-sorter.
And again, your solution and mine are exactly the same!
You wrote yours in terms of Timer-X. I wrote mine in terms of Timer-1, -2, -3 and -4.
And Peter... mine takes only one-pass.
And again, Bernie's solution and mine are exactly the same!
And I don't mean only in terms of the result... it is exactly the same in execution!