





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
it talks about technologies used in business intelligence
Typology: Slides
1 / 9
This page cannot be seen from the preview
Don't miss anything!






Contents Introduction Space Complexity Types of Space Complexity Why do we need to Calculate Space Complexity? How to calculate space complexity
For any algorithm, memory is required for the following purposes:
Type 1: A fixed part that is a space required to store certain data and variables, that are independent of the size of the problem. Type 2: A variable part is a space required by variables, whose size depends on the size of the problem. #include<stdio.h> Fixed part: 10 int main() Variable part: a, b, and c { int a, b, c; c = a + b + 10 ; printf("%d", c); } Types of Space Complexity
For calculating the space complexity, We need to know the amount of memory used by different types of datatype variables, program instructions, constant values, and a few other things like function calls, and recursion stack(in recursion case). Data type in C programming language: int 4 bytes float 4 bytes double 8 bytes char 1 byte short int 2 bytes long int 4 bytes How to calculate space complexity
int main() (EXAMPLE) { int a = 10; float b = 20.5; char c = 'A'; int d[10]; return 0; } To calculate the complexity of this algorithm, we need to determine the amount of memory used by each of the variables. In this case: