0 0 votes C function let n>=m. int gcd(n,m) { if(n%m==0) return m; n=n%m; return gcd(m,n); } time complexity Algorithms time-complexity + – amit166 506 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
0 0 votes Time complexity =0(log(n)) Mohit Kumar 6 answered Sep 11, 2018 Mohit Kumar 6 comment Share Follow See 1 comment 1 1 comment reply Mayankprakash commented Sep 11, 2018 reply Follow flag @mohit Can u please elaborate your solution?. Thanks 0 0 replyShare Please log in or register to add a comment.