+ 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.
5 ответов
+ 1
Pratik Maruti Mohite brackets are not an operation and therefore have no time complexity
+ 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
0
i can't understand what you saying
0
but it takes some time to detecting operation start and end...i think
0
👍