The largest divisor that is shared between two numbers.
Euclidâs Algorithm to find GCD
while a != b:
if a > b:
a = a - b
else:
b = b - a
At the end, a
will store the common divisor between original a
and b
The largest divisor that is shared between two numbers.
while a != b:
if a > b:
a = a - b
else:
b = b - a
At the end, a
will store the common divisor between original a
and b