Algorithms

Stable Sorting

Which sorting algorithms keep equal items in order and whether sorting can beat O(n).

Can Sorting Be Done Faster Than O(n)?

Sorting can't beat linear time in general, since every item must be read. Comparison sorts need O(n log n), but counting sort can reach O(n) on limited keys.

4 min read

Related topics

More in algorithms