diff --git a/snippets/lcm.md b/snippets/lcm.md index cbd86c264..74f346af3 100644 --- a/snippets/lcm.md +++ b/snippets/lcm.md @@ -2,7 +2,7 @@ Returns the least common multiple of two or more numbers. -Use the greatest common divisor (GCD) formula and `Math.abs()` to determine the least common multiple. +Use the greatest common divisor (GCD) formula and the fact that `lcm(x,y) = x * y / gcd(x,y)` to determine the least common multiple. The GCD formula uses recursion. ```js