But it's still a selection sort.
And thus one that works fine for many uses. Most "sorting" happens (at least when measuring "most" by line of code written) because you're about to display something to the user. Using a quadratic algorithm on the few hundred entries a person can actually interpret is hardly a problem. Pick the tool for the job (though, as pointed out elsewhere, that tool should probably be a library function). Algorithmic optimizati…
I would always choose a sorting function from a library over some hand grown thing (with no tests no doubt). They are too easy to make mistakes. Sorting functions are one of those things you get for free in [nearly] every language, writing a new one is usually just a waste of time.