With the help of Euclid's algorithm, we create a GCD function recursively. GCD of 2 integers
Пікірлер: 10
@abdallahsiyabi47842 жыл бұрын
Thumbs up for a great explanation of call stacks. I used to think recursion updated first func call, like this function would terminate because b == 0 as a result of recursion. Thanks man.
@wrttech4222 жыл бұрын
Glad it was helpful!
@kacpermokrzycki21443 жыл бұрын
as a curiosity you can also write def GCD(a,b): return a if b==0 else GCD(b,a%b) if anyone is obsessed with shortcode :))
@th3crypt Жыл бұрын
Such Talent, dope g
@donpilarsuarezgudino51602 жыл бұрын
Fantastic!! Of course I`ve learned something. What a lecture, man. Thanks a lot.
@wrttech4222 жыл бұрын
Glad it was helpful!
@dillic8656 Жыл бұрын
Thank you so much for explaining, this video helped me out alot.