Slowsort

Slowsort is an esoteric sort based on the concept of "multiply and surrender", opposite to "divide and conquer". it runs in $$O(n^{\log n})$$, uses $$O(n)$$ stack memory, and is unstable.

= Explanation = To slowsort an array, first, slowsort the first and second halves, compare the last elements of the now-sorted halves, and move the larger one to the end. finally, slowsort the rest of the array (not including the largest element)

= Pseudocode = procedure slow_sort(array arr,int i,int j) do if i >= j do return end if int mid = middle(i,j) slow_sort(arr,i,mid) slow_sort(arr,mid + 1,j) if arr[mid] > arr[j] do swap arr[mid] and arr[j] end if slow_sort(arr,i,j - 1) end