Euclidean algorithm

The Euclidean algorithm computes the greatest common divisor of two integers by repeatedly replacing them with a smaller pair that has the same divisor.

Connect