5 ms·
Right, which is why nobody ever used qsort. Or, wait. It's been widely used for a long time...
by anarazel 9y ago
Right, which is why nobody ever used qsort. Or, wait. It's been widely used for a long time...
- amelius 9y agoWell, I didn't say "worst case". If qsort only provided a constant ratio time improvement over bubble sort in the average case, then it wouldn't have been so popular.
- kcorbitt 9y agoActually, big-O complexity by definition is determined based on the worst case. https://stackoverflow.com/questions/3230122/big-oh-vs-big-theta https://stackoverflow.com/questions/3230122/big-oh-vs-big-th...
- anarazel 9y agoSure, you can point to algorithms that nobody experienced ever uses. But if you e.g. compare qsort usage with heapsort usage, people use qsort because of it's better constant factors, even though the worst case complexity is worse.