I am looking for an algorithm without comparison or comparison that can sort an array containing any permutation of the first n positive integers, which should be O (n) time complexity and O (1) space complexity.
Is there an existing algorithm that meets these specifications?
sorting algorithm
fmunshi
source share