Algorithms, Blockchain and Cloud

GCD, Greatest Common Divisor


In [here], the GCD (Greatest Common Divisor) is given in brief details. The algorithm can be implemented in both recursive and iterative forms. The recursive formula is , and it has a rough complexity .

The following properties may be used in other solution.

, if a = b

, if a and b are both even.

if a is even and b is odd.
if a and b are both odd.

–EOF (The Ultimate Computing & Technology Blog) —

350 words
Last Post: Codeforces: A. System Administrator
Next Post: A Faster Exponentiation Algorithm by Squaring (Power Function)

The Permanent URL is: GCD, Greatest Common Divisor (AMP Version)

Exit mobile version