00:01
All right, so here we're writing some pseudo code for the extended gcd.
00:04
So i'll just call it extended gcd, and we need what we're taking the gcd of, right? so it'll just be ab, which are positive integers.
00:17
Okay, so first we just want to set all of our initial conditions, right? so the algorithm just states that s not is equal to 1.
00:25
S1 should be equal to 0.
00:30
T not should be equal to 0.
00:34
And t1 should be equal to 1.
00:37
Okay, we'll also just set x equal to a, y is equal to our b, and then we'll have a little index here as well.
00:47
So a lot of just setting our variables.
00:52
Okay, so then we move on, and we want to make a while loop.
00:56
And this loop is going to do that first case where we find all of our cues essentially, right? where we are going through and doing our divisions.
01:11
So while y does not equal zero, we'll take the remainder of x mod y.
01:23
We'll let qi be equal to x divided by y.
01:35
Then we'll set x equal to y.
01:39
Now, y equal to r...