class Solution { public: int gcd(int a, int b) { // write code here if(max(a,b)-min(a,b)==0) return max(a,b); else{ return gcd(max(a,b)-min(a,b), min(a,b)); } } };
class Solution { public: int gcd(int a, int b) { // write code here if(max(a,b)-min(a,b)==0) return max(a,b); else{ return gcd(max(a,b)-min(a,b), min(a,b)); } } };