gcd(a, b) computing the greatest common divisor of two non-negative integers using the recursive Euclidean algorithm: gcd(a, 0) = a, and gcd(a, b) = gcd(b, a % b) otherwise.gcd(48, 18)
6
48 = 2*18 + 12 -> gcd(18,12) -> gcd(12,6) -> gcd(6,0) = 6.
gcd(17, 5)
1
17 and 5 are coprime.
Base case: b == 0, return a.
Recursive case: gcd(b, a % b).