O(1) Extra Space
← Back to In-Place Algorithms
An algorithm that uses only a constant amount of additional memory regardless of input size. In-place algorithms modify the input data structure directly rather than creating copies. Examples include in-place quicksort, heapsort, and selection sort.
computational-complexity space-complexity in-place constant-space