r/datastructure • u/[deleted] • Jan 01 '19
Space Complexity of Algorithms
Whenever a solution to a problem is written some memory is required to complete. For any algorithm memory may be used for the following:
Variables (This include the constant values, temporary values)
Program Instruction
Execution
Sometime Auxiliary Space is confused with Space Complexity. But Auxiliary Space is the extra space or the temporary space used by the algorithm during it's execution.
4
Upvotes