Time complexity of the recursive call
How 'a' value is decremented throughout the recursive call.
Is it o(log a) or O(log log a) or something else
int result(int a, int b)
{
if( a %b == 0)
return b;
a = a % b;
return result(b,a);
}
Time complexity of the recursive call
How 'a' value is decremented throughout the recursive call.
Is it o(log a) or O(log log a) or something else
int result(int a, int b)
{
if( a %b == 0)
return b;
a = a % b;
return result(b,a);
}