470 views
1 votes
1 votes
foo(int n, int a[])
    {
        int i=0,j=0;
        for(i=0;i<=n;i++)
        while (j<n && A[i]<A[j])
        j++;
    }

Time complexity of foo()

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
1
Rackson asked Jan 12, 2019
956 views
0 votes
0 votes
0 answers
2
0 votes
0 votes
1 answer
3
junaid ahmad asked Jan 31, 2018
532 views
#include<stdio.h int main() { int sum =0; for(limit=1;limit<=n;limit*=2) { for(i=0;i<limit;i++) { for(j=0;j<n;j+=2) { sum+=j; } for(j=1;j<n;j*=2) { sum*=j; } } } }