+ 1

Why we don't consider Time Complexity of brackets like { ,} .

I am calculationg time complexity of the following program #include<stdio.h> void main() { int i:; for(i=0;i<10;i++) { printf("%d\n",i); } } so when I compiling program step wise it take some time in brackets but why we don't consider time complexity of the brackets.

14th Jul 2018, 6:18 AM
Pratik Mohite
Pratik Mohite - avatar
5 ответов
+ 1
Pratik Maruti Mohite brackets are not an operation and therefore have no time complexity
14th Jul 2018, 7:32 AM
hinanawi
hinanawi - avatar
+ 2
Pratik Maruti Mohite when the code is converted into assembly, the brackets are no longer there as assembly does not utilize them, so no, they do not take any time to detect during runtime
14th Jul 2018, 7:36 AM
hinanawi
hinanawi - avatar
0
i can't understand what you saying
14th Jul 2018, 6:29 AM
Pratik Mohite
Pratik Mohite - avatar
0
but it takes some time to detecting operation start and end...i think
14th Jul 2018, 7:34 AM
Pratik Mohite
Pratik Mohite - avatar
0
👍
14th Jul 2018, 7:37 AM
Pratik Mohite
Pratik Mohite - avatar