javascript-algorithms icon indicating copy to clipboard operation
javascript-algorithms copied to clipboard

Added Extended Euclidean Algorithm

Open vishalt12345 opened this issue 3 years ago • 0 comments

While the Euclidean algorithm calculates only the greatest common divisor (GCD) of two integers a and b, the extended version also finds a way to represent GCD in terms of a and b, i.e. coefficients x and y for which: a * x + b * y = gcd(a, b). This is extremely useful in the application of the chinese remainder theorem and calculating modular inverses.

vishalt12345 avatar Jun 26 '22 06:06 vishalt12345