Circle Sort

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

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 end