Consider the following function
int foo(int n) {
int count1=0, count2=0;
if (n < 0) n = -n;
if (n == 0) return 1;
If (n == 1) return 0;
while (n) {
if (n & 1) count1++;
n = n >> 1;
if (n & 1) count2++;
n = n>>1;
}
return foo(abs(count1 - count2));
}
What is the time complexity for the above function?