You are viewing a single comment's thread. Return to all comments →
Scala solution
def gcd(x: Int, y: Int): Int = { if (x == 0) y else gcd(y % x, x) }
Seems like cookies are disabled on this browser, please enable them to open this website
Computing the GCD
You are viewing a single comment's thread. Return to all comments →
Scala solution