Intuition
A fast method can still fail if it needs too much memory.
Technical definition
Space complexity is the asymptotic memory required by an algorithm, including auxiliary data structures and sometimes input storage depending on convention.
Example
A dynamic programming algorithm may trade extra memory for faster computation.
Common misunderstandings
- Low time complexity does not imply low memory use.
- Memory access patterns can matter as much as total memory volume.