Comparison Sort Lower Bound
\Omega(n \log n)
Decision-tree bound for any comparison-based sort (Merge Sort, Heapsort, Timsort).
Sorting algorithm time/space complexities, Binary Search Tree invariants and traversals, and Dijkstras weighted shortest-path algorithm.
\Omega(n \log n)
Decision-tree bound for any comparison-based sort (Merge Sort, Heapsort, Timsort).
h_{\text{balanced}} = \lfloor \log_2 n \rfloor, \quad h_{\text{skewed}} = n - 1
Search/insert/delete run in O(h) time.
O\big((V + E)\log V\big)
Requires non-negative edge weights w(u, v) >= 0.
\text{Left} \to \text{Node} \to \text{Right} \implies \text{Sorted Sequence}
Visits keys in strictly ascending order.
Dijkstra greedily finalizes the closest unvisited node assuming no future path can lower its distance; a negative edge later can violate that assumption (use Bellman-Ford instead).
Merge Sort, Insertion Sort, and Bubble Sort preserve the relative order of equal keys, whereas standard in-place Quicksort and Heapsort are unstable.
Quicksort hits O(n^2) when pivot selection repeatedly picks the smallest or largest element, such as naive first-element pivoting on already-sorted arrays.