...

/

Solution Review 1: Euclidean Algorithm

Solution Review 1: Euclidean Algorithm

This review discusses the solution of the Euclidean algorithm challenge in detail from basic to extensive level.

How does the Euclidean algorithm work?

The Euclidean algorithm is based on the principle that the greatest common divisor of two numbers does not change if the larger value of the two is replaced by the difference between both numbers.

Let’s look at an example:

The GCD of 252252 and 105105 is 2121 (252252 = 2121 x 1212 and 105105 = 2121 x 55). Now, 2121 is also the GCD of ...

Source: Euclidean Algorithm - Wikipedia under lisense CC-BY-SA 3.0
Source: Euclidean Algorithm - Wikipedia under lisense CC-BY-SA 3.0