Big Big O (III)

1
2
3
4
5
6
7
8
for(int i=0; i<n; i++){
    for(int j=0; j<10; j++){
        if(A[i][j]%2){
            cout<<A[i][j];
        }
        cout<<endl;
    }
}

The c++ code given above runs in __________ \text{\_\_\_\_\_\_\_\_\_\_} .


This problem is a part of the set: Efficient Algorithms .
O ( n 3 ) O(n^3) O ( n 2 ) O(n^2) O ( n ) O(n) O ( 1 ) O(1)

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Hasmik Garyaka
Sep 16, 2017

10 n is O(n)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...