int recursive(int n)
{
int x,y;
if (n <= 1) return 0;
else
{
for (int i=0; i < n ; ++i) O(1);
recursive (n/2);
recursive (n/2);
}
}
i said T(n)=Constant+n*n*log(n);
i am not so sure about it, am i correct?
Each one of the terms is O(n) and there are k (=log2n) terms,
so, the complexity of the sum is k*O(n) = O(nlogn),
which also gives a total complexity of O(nlogn).