8 ms·
Constant time in practise is a notable difference from saying constant time. I can always sort a 32-bit int array in worst case linear time using counting sort
by JeanPierre 12y ago
Constant time in practise is a notable difference from saying constant time.
I can always sort a 32-bit int array in worst case linear time using counting sort, which in theory is better than the worst case runtime of quicksort, O(n²). Is it better in practise? Of course not, the constant factor is just too high, both for time and memory.