...

/

Solution: Fibonacci and HCF (Recursion)

Solution: Fibonacci and HCF (Recursion)

Go over the solution to calculating the HCF recursively.

We'll cover the following...

Solution

Press + to interact
def hcf(a, b)
if b == 0
return a
else
return hcf(b, a % b)
end
end

Explanation

  • Line ...