This is also the same as Time Complexity, but space complexity defines the space used by an algorithm.
Space complexity is a measure of the amount of working storage an algorithm needs. That means how much memory, in the worst case, is needed at any point in the algorithm. As with time complexity, we're mostly concerned with how space needs to grow, in Big-Oh terms, as the size N of the input problem grows.