in Algorithms retagged by
1,269 views
1 vote
1 vote

Is this the correct way to solve ?

Q) int algorithm(int n)
{
   int sum =0;k,j;
   for (k=0;k<n/2;k++)
      for(j=0;j<10;j++)
          sum++;
  return 4*algorithm(n/2)*algorithm(n/2)+algorithm(n/2)*algorithm(n/2)
}

in Algorithms retagged by
1.3k views

4 Comments

@Shaik Masthan now my doubt is clear, thanks a lot

1
1

@Shaik Masthan,Bhai but in above example the code has been used 3 times. However,since 4*T(n/2) has been mentioned therefore,the code used 4 times. Am I right?

0
0
noo brother, read one more time the previous comments !

is it 3 times or 4 times used check ome more time ?
0
0

Please log in or register to answer this question.

Related questions