retagged by
363 views
0 votes
0 votes

void fun(int n, int k)

{

    for (int i=1; i<=n; i++)

    {

      int p = pow(i, k);

      for (int j=1; j<=p; j++)

      {

          // Some O(1) work

      }

    }

}

Time complexity= ?

retagged by

1 Answer

Related questions

1 votes
1 votes
0 answers
1
srestha asked May 19, 2019
596 views
Let $A(n)$ denotes the number of $n$ bit binary strings which have no pair of consecutive $1’s.$ what will be recurrence relation for it and what will be it’s Time Co...
0 votes
0 votes
1 answer
2
eyeamgj asked Jun 24, 2018
399 views
consider the following c program A(n){if(n<=1)return(n2 +n+1)elsereturn(5A(n/2)+3A(n/2)+MA(n))}where MA(n) has complexity O(n2).1.what is the recurrence relation for valu...
1 votes
1 votes
1 answer
3
nikkey123 asked Jan 3, 2018
384 views
11 votes
11 votes
2 answers
4
Shubhanshu asked Jun 5, 2017
11,052 views
The average successful search time taken by binary search on a sorted array of $10$ items?$2.6$$2.7$$2.8$$2.9$Answer is $2.9$My doubt:- But when I am using $log_2n$ for $...