EuclideanSolver
public struct EuclideanSolver
Euclidean algorithm is a method for computing the Greatest Common Divisor of two numbers
-
Finds the Greatest Common Divisor (GCD) of
a
andb
.Check Euclidean algorithm for more details.
Declaration
Swift
public static func findGreatestCommonDivisor(_ a: Int, _ b: Int) -> Int
Parameters
a
One integer.
b
Other integer.
Return Value
GCD of
a
andb
.