I have problem in determining time complexities of algorithms.
for(int i=0;i <n i++){} O(n)
for(int i= 0 ;i<n ;i++){ O(n^2)
for(int j=0;j<n;j++){
}
}
Now for following code whats the complexity
for(i =0; i<n ; i++) {}
for (j=0;j<n ;j++ ) {}
is it O(2n) as it invloves 2 seperate loops?
what if i start j =5 to n?