previous | start | next

What sort? - answer

Insertion sort, but instead of exchanging elements in order to insert, move the item to insert to the extra space if it is smaller than the last item inserted. Then move the already inserted items over one place until the correct place is found. Finally move the item from the extra space to this location.



previous | start | next