Cycle sort is a comparison based sorting algorithm which forces array to be factored into the number of cycles where each of them can be rotated to produce a sorted array with O(N^2) time complexity It is an in-place and unstable sorting algorithm and is optimal in terms of number of memory writes