We will demonstrate Extended Euclidean Algorithm. We will see how you can calculate the greatest common divisor in a naive way which takes O(N) time complexity which we can improve to O(log N) time complexity using Euclid's algorithm. Extended Euclidean Algorithm takes O(log N) time complexity