1.

What is the following expression, lcm (a, gcd (a, b)) equal to?(a) a(b) b(c) a*b(d) a + bI have been asked this question in an international level competition.This intriguing question originated from GCD LCM recursion in portion Recursion of Data Structures & Algorithms II

Answer»

The correct answer is (a) a

For explanation: Since the lcm FUNCTION FOLLOWS ABSORPTION laws so lcm (a, gcd (a, B)) equal to a.



Discussion

No Comment Found

Related InterviewSolutions