Define space complexity in data structure
Answers
Total amount of computer memory required by an algorithm to complete its execution is called as space complexity of that algorithm
Generally, when a program is under execution it uses the computer memory for THREE reasons. They are as follows...
1. Instruction Space: It is the amount of memory used to store compiled version of instructions.2. Environmental Stack: It is the amount of memory used to store information of partially executed functions at the time of function call.
3. Data Space: It is the amount of memory used to store all the variables and constants.
Answer:
Total amount of computer memory required by an algorithm to complete its execution is called as space complexity of that algorithm
Generally, when a program is under execution it uses the computer memory for THREE reasons. They are as follows...
1. Instruction Space: It is the amount of memory used to store compiled version of instructions.
2. Environmental Stack: It is the amount of memory used to store information of partially executed functions at the time of function call.
3. Data Space: It is the amount of memory used to store all the variables and constants.