How do I sort a list of n fractions, with a range of 1 to n^k in O(n) time?
The answer to this... View the full answer
- Is there any way you can sort a List in O(n) linear time ?
- Jun 12, 2018 at 12:58pm
- There is no way to sort in Linear time. There is no algorithm that takes O(n) time. The algorithms I have mentioned are some of the most efficient algorithms out there.
- Jun 12, 2018 at 1:07pm
- What about counting/radix sort?
- Jun 12, 2018 at 1:19pm
- Even they take O(nlogn) depending on the number of digits
- Jun 12, 2018 at 1:40pm