1.

Is gcd an associative function.(a) True(b) FalseI have been asked this question by my college director while I was bunking the class.My question is taken from GCD LCM Recursion, in division Recursion of Data Structures & Algorithms II

Answer»

The correct answer is (a) True

Explanation: The gcd FUNCTION is an ASSOCIATIVE function as gcd (a, gcd (B, c)) = gcd (gcd (a, b), c).



Discussion

No Comment Found

Related InterviewSolutions