+ 1
Sorting Algorithm
I am familiar with many sorting algorithms that have the following time complexities: O(n²) for both ascending and descending order O(log n) for both ascending and descending order O(2n) or O(n) for ascending order only I'm looking for a sorting algorithm that has a time complexity of O(n) and can sort in both ascending and descending order. Could you suggest one?
2 odpowiedzi
+ 2
Where are you gping to use this O(n) sort algorithm ?
will you be using a linked list or array ?
Based on these answers I can recommend something relevant.
+ 1
Morpheus I typically use arrays because they allow faster access and modification of elements