edited by
1,731 views
2 votes
2 votes
What is the worst case time complexity to find the gcd(m,n) using best algorithm known?

A. O(log(min(m,n)))

B, O(log(max(m,n)))
edited by

2 Answers

Related questions

2 votes
2 votes
2 answers
2
Amar Vashishth asked Aug 2, 2015
2,436 views
int fun(int n) { int count=0; for (int i= n; i 0; i/=2) for(int j=0; j< i; j++) count+= 1; return count; }
0 votes
0 votes
1 answer
3
LavTheRawkstar asked Jan 12, 2017
838 views
INSERTION-SORT (A, n) ⊳ A[1 . . n]for (j ← 2 to len(A) ){key ← A[ j];i ← j – 1 ; while (i 0 and A[i] key) { A[...
0 votes
0 votes
0 answers
4
usdid asked Jul 2, 2022
501 views
what is the running time of the following iterative algorithm?b) It is possible to talk about the best, average and worst running times for this algorithm. Why? pseudo co...