00:01
So they want to use the tournament sort to sort this list of numbers that they provide here.
00:06
So we just kind of go through what that algorithm is.
00:11
So they tell us we start from left to right and then we just compare each of the pairs that come up.
00:16
So we do 17 verse 4.
00:18
So we're going to choose the largest of these two, which is going to be 17.
00:23
Then we're going to compare the next set.
00:25
1 and 5, so 5 is larger.
00:27
And then we're going to compare 13 and 10, and so there 13 is larger.
00:33
And then we would compare 14 and 6, so 14 is larger.
00:38
Now we're going to compare each pairs going left to right for this second round here.
00:47
So we're going to do 17 verse 5, well 17 is larger.
00:50
And then 13 verse 14, well 14 is larger.
00:54
Then lastly, we're going to compare 17 versus 14.
00:58
And this is going to give that 17 is larger.
01:02
So what we've learned from this is that 17 is the largest value in our set.
01:09
So now what we're going to do is go ahead and copy this graph and then replace 17 with negative infinity.
01:20
So let me go ahead and copy this real quick.
01:23
So let's erase all these 17s.
01:29
Like i was saying, we're replacing them.
01:32
With a negative infinity, or at least we'll replace the one at the very bottom with negative infinity.
01:36
So now we're going to repeat this, but notice we only need to do this now for the ones where we erase 17 from.
01:44
So we do negative infinity versus four.
01:46
So we're assuming negative infinity is the largest or the smallest possible element that we can have.
01:51
So that means four is larger than it.
01:53
And then we do four verse five, well five's larger.
01:56
And then five verse 14, will 14 is larger.
01:59
So what this tells us is that 17 and then 14 would be our largest.
02:05
And now we're going to repeat this and then continue this process.
02:11
And this time we would place 14 with negative infinity.
02:17
So erase all of these 14s.
02:21
And then at the very bottom we'll put a negative infinity.
02:25
All right.
02:26
So negative infinity for six, remember negative infinity we're assuming is smaller than all other values.
02:30
So we'd have six.
02:30
Winning and 6 versus 13 will 13 wins and then 5 verse 13 13 wins so that means we'd have 17 14 13 for our ordering so far and now again we're going to replace 13 with negative infinity and then repeat this all right so erase all the 13s and now we put negative infinity down here so negative infinity down here so negative 20 verse 10, 10 ones, 10 verse 6, 10 ones, 5 verse 10, 10 ones.
03:14
So, so far we have 17, 14, 13, and then 10.
03:23
Now we're going to copy this one more time, and then replace 10 with negative infinity.
03:31
So erase all of the tens, and now we replace that with negative infinity.
03:40
So if we have the same number, it doesn't matter which one moves up...