Source
Revise GCD.
- Euclid’s Algorithm: This is an efficient and popular method for finding the GCD. It works as follows:
- Divide the larger number by the smaller number.
- Take the remainder of this division.
- If the remainder is 0, the smaller number is the GCD.
- Otherwise, repeat steps 1-3 using the smaller number and the remainder from the previous division.