I am learning Big O and am stuck on a problem.
Problem -
int sample_function (int x) {
if (x<1){
return x;}
int y = x/2;
return sample_function (y) + sample_function (x-y);
}
What will the big O be if we call 2 recursive calls of (n/2)? I know that Big O of a dividing recursive function (n/2) is O(log(n)) but not sure about this problem.