I have a list of strings which has been sorted by a specific comparison function.
Now I have to re-sort this list using a different comparison function.
This new comparison function behaves slightly different when comparing certain special characters, like Umlauts for example. In most cases the element has to be moved just one or two slots to get to the correct position.
Which sorting algorithm is best suited to re-sort this almost fully sorted list in terms of runtime execution speed?
Insertion sort works well on small or nearly sorted lists.
From this ACM Paper:
From wiki article Insertion sort:
SO Question: Is there ever a good reason to use Insertion Sort?