Linearithmic sorts are optimal!
- Justify is the lower bound for comparison-based sorting algorithms.
Let's restate the observation made earlier:
Since the decision tree is a binary tree, its height is at least where is the number of nodes. Therefore, the lower bound on any comparison-based algorithm modeled by this decision tree is .
For sorting, is where is the number of elements in the collection to be sorted.
Why?
In the decision tree corresponding to the comparison-based sorting algorithm, the number of leaves is greater or equal to the number of possible answers which is greater or equal to , the number of permutations of the elements.

As it can be seen in the diagram above, for a collection with elements, there are permutations in which one is the correct answer (elements in sorted order; there is only one sorted order if elements are unique).
So, if there are at least leaves, there are at least nodes. The height of the tree, therefore, is at least .
Therefore, the lower bound on any comparison-based sorting algorithm is where is the size of the collection.
We can show . In other words, linearithmic sorts are optimal!
How come?
Expand
If we take out up to but not including from the above series, we have:
We can also write
Therefore .
Moreover, we can show because
So, in fact, .
Aside: You can also show this using Stirling's approximation: