From 24ade51ca437fefea21cdc9b95b7a38ff3a4279c Mon Sep 17 00:00:00 2001 From: Rohit Tanwar Date: Sun, 21 Jan 2018 12:32:41 +0530 Subject: [PATCH] add info gcd --- README.md | 2 ++ snippets/gcd.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index cb8889663..b685947e7 100644 --- a/README.md +++ b/README.md @@ -226,6 +226,8 @@ count_vowels('gym') # 0 ### gcd +:information_source: `math.gcd` works with only two numbers + Calculates the greatest common divisor between two or more numbers/lists. The `helperGcdfunction` uses recursion. Base case is when `y` equals `0`. In this case, return `x`. Otherwise, return the GCD of `y` and the remainder of the division `x/y`. diff --git a/snippets/gcd.md b/snippets/gcd.md index 595551859..1df3b60f8 100644 --- a/snippets/gcd.md +++ b/snippets/gcd.md @@ -1,5 +1,7 @@ ### gcd +:information_source: `math.gcd` works with only two numbers + Calculates the greatest common divisor between two or more numbers/lists. The `helperGcdfunction` uses recursion. Base case is when `y` equals `0`. In this case, return `x`. Otherwise, return the GCD of `y` and the remainder of the division `x/y`.