Circle sort algorithm compares the first element to the last element, then the second element to the second last element, etc.
Then split the array in two and recurse until there is only one single element in the array.
In short below two steps are repeated while there are swap operations involved in the steps.
- Compare the first element to the last element, then the second element to the second last element, etc.
- Then split the array in two and recurse until there is only one single element in the array.
Image source SourceForge