Cyclic sort is an non comparison algorithm. It won't compare with other elements.Prevoius part 1 post we seen algorithms are comparison algorithm. It will take elemement check element is present in index+1 index or not.if its not move the element into correct index. Cyclic Sort Hariprasath V

 

 

Time Complexity : O(n) Space Complexity : O(1) Hariprasath V\

Merge Sort is divide and conquer algorithm. It will divide the array by half each time make two half. Sort two half of the array seperately and merge them in sorted order. Hariprasath V Merge Sort

Time Complexity : O(nlogn) Space Complexity : O(n) Hariprasath V