Add note about Euclid's algorithm to greatest_common_divisior.lua

This commit is contained in:
Camden Dixie O'Brien 2023-12-11 16:09:45 +00:00
parent 8edca7f075
commit 3558a24b47

View File

@ -1,6 +1,8 @@
-- The greatest common divisor (GCD) of two numbers X and Y is, as the
-- name suggests, the largest number which evenly divides both X and
-- Y. Implement the function below to calculate this.
-- The greatest common divisor (GCD) of two numbers is, as the name
-- suggests, the largest number which evenly divides both. Implement
-- the function below to calculate this. It's recommended that you
-- use Euclid's algorithm but feel free to use another approach if you
-- want.
--
-- Solution --------------------------------------------------------------------
function greatest_common_divisor(x, y)