The correctness proof also gave us a nice way to bound the
worst-case run-time:
.
It is also instructive to look at the best case. We have to
execute the ``for loop'' at least once, so
.
And for a sorted list, this bound is acheived. So
is
the best-case running time.