
Day-4: Euclidian GCD Algorithm
Euclidian GCD algorithm is used for calculating greatest common divisor of two numbers- depending on data type, the numbers may be double or int etc.
The algorithm has two steps: -> Checks if b divides a ->If yes, returns b immediately ->If not, tries the same for b and a%b
Time complexity: O(log(ab)) (It happens when a and b are Fibonacci numbers that are consecutive)
Here is the link of my C++ implementation of Euclidian GCD: Euclidian GCD