Definition
• The GCDis the greatest number that divides a set of numbers
without leaving a remainder. For example: GCD of 4 and 6 is
2, as it divides both numbers and is the largest of all their
factors.
• The GCD of any two numbers is never negative or 0, and the
least positive integer common to any two numbers is always
1.
Euclidean algorithms
• TheEuclidean Division Algorithm is a method used in
mathematics to find the greatest common divisor (GCD) of
two integers. It is based on Euclid's Division Lemma. In this
algorithm, we repeatedly divide and find remainders until
the remainder becomes zero.