How can we modify almost any algorithm to have a good best-case running time?

We can design any algorithm to treat its best-case scenario as a special case and return a predetermined solution.

For example, for selection sort, we can check whether the input array is already sorted and if it is, we can return without doing anything. We can check whether an array is sorted in linear time. So, selection sort can run with a best-case running time of \(\Theta(n)\).