Sort n numbers in range from 0 to n^2 – 1 in linear time – Searching and sorting – If we use Counting Sort, it would take O(n^2) time as the given range is of size n^2. Using any comparison based sorting like Merge Sort, Heap Sort, .. etc would take O(nLogn) time.
Sort n numbers
1 Article
1