Space complexity and Auxiliary space are two of the most often confused and interchangeably used terms when talking about the space complexity of a certain algorithm:
- Auxiliary Space: The extra space that is taken by an algorithm temporarily to finish its work
- Space Complexity: Space complexity is the total space taken by the algorithm with respect to the input size plus the auxiliary space that the algorithm uses.
When we try to compare two algorithms, we usually have a similar type of input, that is, the size of the input can be disregarded and thus what we do end up comparing is the auxiliary space of the algorithms. It's not a big deal to use either of the terms, as long as we understand the distinction between the two and use them correctly.
If we were using a low-level language such as C, then we can break down the memory required/consumed based on the data type, for example, 2 bytes to store an integer, 4 bytes to store floating point, and so on....