edited by
470 views

1 Answer

Best answer
0 votes
0 votes

Recurrence Relation of above program =4T(n/2)+n2

Now solve using master theorem =O(n2logn)

selected by

Related questions

2 votes
2 votes
2 answers
2
Amar Vashishth asked Aug 2, 2015
2,446 views
int fun(int n) { int count=0; for (int i= n; i 0; i/=2) for(int j=0; j< i; j++) count+= 1; return count; }
8 votes
8 votes
2 answers
3
1 votes
1 votes
1 answer
4
shikharV asked Nov 15, 2015
1,039 views
The answer to the above problem is A but I am expecting it to be D as constant amount of work is required to solve each subproblem.