Time Complexity Examples with Codes
1) printf("Hello World")
The time complextiy for above will be O(1) since it will run in constant time throughout the number of iterations therefore it is called as constant time.
2) int val = 0;
for(int i = 1; i <= N; i += i){
val++;
}
We will calcu...
techie2.hashnode.dev1 min read