I want to know about how Time complexity is log (max(a,b))
Find the time complexity of the following Code : int gcd(int a,int b)
{ if(b==0) return a; else Return gcd(b,a%b); }
I want to know about how Time complexity is log (max(a,b))
Find the time complexity of the following Code : int gcd(int a,int b)
{ if(b==0) return a; else Return gcd(b,a%b); }