2081 5

Data Structures and Algorithms20815 marksFactorial, Fibonacci Sequence, GCD, Tower of Hanoi

Write a program to find GCD of two numbers using recursion.

Write a program to find GCD of two numbers using recursion. [5]

The GCD (Greatest Common Divisor) of two numbers is based on the Euclidean Algorithm: - If b == 0, then GCD(a, b) = a - Otherwise, GCD(a, b) = GCD(b, a % b) This is a naturally recursive problem, and Recursion helps solve problems that are naturally recursive in structure. --- --- Input: num1 = 4...

Up nextWhat is the application of spanning tree? Draw a MST of a graph containing any 8 vertices