# Space Complexity

###### This wiki is incomplete.

This is a placeholder wiki page. Replace this text with information about the topic of this page. For further help in starting a wiki page, check out Wiki Guidelines and Wiki Formatting or come chat with us.

## Section Heading

Space complexity is a term used when dealing with algorithm analysis. It's an expression that describes the amount of memory (space) required to perform the task that the algorithm is expected to solve. For example, insertion sort has a space complexity of O(1), because it doesn't need extra allocation of memory in order to sort the provided collection. In this case we say that the sorting operation is done in-place. Merge sort is different, and it has a space complexity of O(n). That's explained because the implementation of merge sort divides the array in two (this is done recursively) creating a new array (or list) of N/2 at each step. The sorting operation requires the allocation of new space in memory.

## Example Question 1

This is the answer to the question, with a detailed solution. If math is needed, it can be done inline: $x^2 = 144$, or it can be in a centered display:

$\frac{x^2}{x+3} = 4y$

And our final answer is 10. $_\square$

**Cite as:**Space Complexity.

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/space-complexity/