GATEverse Practice, past papers & mock tests
GATE 2007
AlgorithmsAlgorithm Analysis and Asymptotic NotationsmediumMCQ1 mark
In the following C function, let n >= m.
c
int gcd(int n, int m) {
    if (n % m == 0) return m;
    n = n % m;
    return gcd(m, n);
}
How many recursive calls are made by this function?
Save your progress

Related Algorithms PYQs