Added the extended Euclidean algorithm implementation