Space complexity
Space complexity is a metric that evaluates the total memory space required by an algorithm in terms of the size of its input data. It is analogous to time complexity but focuses on memory usage instead of execution time.
Space complexity is a metric that evaluates the total memory space required by an algorithm in terms of the size of its input data. It is analogous to time complexity but focuses on memory usage instead of execution time.