In-Place vs Extra Space

Back to Analysis

Whether a sorting algorithm requires only O(1) additional memory (in-place) or needs extra space proportional to the input. Quicksort and heapsort are in-place; merge sort requires O(n) extra space. This tradeoff affects practical performance on memory-constrained systems.

algorithms sorting in-place space