|
|
|
|
|
by repsilat
5604 days ago
|
|
> ...an abuse of notation, in the same way that people say that Quicksort is O(n lg n) on average. I think I may have misunderstood what you meant by this. If I have, I apologise, if I haven't... Talking about the average-case complexity of algorithms with Big-Oh notation is in no way an "abuse" of that notation. If the average time complexity of an algorithm is `O(f(n))`, then its running time averaged over all inputs of size `n` is bounded above (in some sense) by `f(n)`. I guess that statement doesn't say that the number of comparisons or swaps or "steps" the algorithms must make to complete is `O(n lg n)`. Perhaps that's what you meant. |
|