gcd
Calculates the greatest common divisor between two or more numbers/arrays.
- The inner
_gcd
function uses recursion. - Base case is when
y
equals0
. In this case, returnx
. - Otherwise, return the GCD of
y
and the remainder of the divisionx/y
.