Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

euclidean algorithm recursive python

def gcd(a, b):
  return b if (a == 0) else gcd(b%a, a)
#contributed by rohit gupta
 
PREVIOUS NEXT
Tagged: #euclidean #algorithm #recursive #python
ADD COMMENT
Topic
Name
3+6 =