Question DSA-MATH-0017
HardWhat is the output of this code?
def egcd(a, b):
if b == 0:
return a, 1, 0
g, x, y = egcd(b, a % b)
return g, y, x - (a // b) * y
print(egcd(4, 6))
- A.
(1, 0, 1)
- B.
(2, 2, -1)
- C.
Sign up free to see the answer and a step-by-step explanation.