Circle Sort

Circle Sort is an $$O(n \log^2 n)$$ sort that is unstable, but adaptive, and uses $$O(1)$$ space.

Circle Sort can be likened to an imperfect Quicksort, with the partition using only compare-and-swaps. This will not sort the array properly, but iterating it will. Because its partitions do not overlap, it can be parallelized with each imperfect quicksort taking $$O(n)$$ time, yielding $$O(n \log n)$$ time for the whole sort. The exact number of comparisons for Circle Sort: $$\frac{1}{2}n(\log n)^2$$

Explanation
A Halver is a function that is like a reverse, but instead of swapping it compare-and-swaps. A circle pass uses a halver on the range of the array, then recursively circle passes the front half and the second half, stopping when it reaches 1 element. To Circle Sort, circle pass the array until no swaps are made, meaning the array is sorted.

Pseudocode
procedure halver(arr,start,end) do int i = start int j = end boolean swapped = false; while i < j do if arr[i] > arr[j] do swap arr[i] and arr[j] swapped = true end if i ++ j -- end while return swapped end procedure circle_pass(arr,start,end) do if start >= end do return false end if boolean swapped = halver(arr,start,end) int mid = floor((start + end) / 2) boolean left = circle_pass(arr,start,mid) boolean right = circle_pass(arr,mid + 1,end) return swapped or left or right end procedure circle_sort(arr) do while circle_pass(arr,0,length(arr) - 1) == true do end while end

Introspective circle sort
Introspective Circle Sort is Circle Sort, but if the sorting makes more than $$\frac{\log n}{2}$$ circle passes, it finishes off with Insertion Sort.