Space complicity give one example
Answers
Answered by
0
Answer:
The space complexity of an algorithm or a computer program is the amount of memory space required to solve an instance of the computational problem as a function of characteristics of the input. It is the memory required by an algorithm to execute a program and produce output.
Explanation:
MARK AS BRAINLIEST ANSWER AND FOLLOW ME.
Answered by
0
Answer:
Space complexity is the total amount of memory space used by an algorithm/program including the space of input values for execution. So to find space complexity, it is enough to calculate the space occupied by the variables used in an algorithm/program.
Example :
#include<stdio.h>
int main()
{
int a = 5, b = 5, c;
c = a + b;
printf("%d", c);
}
Explanation:
Similar questions