text
stringlengths
1
81
start
float64
0
10.1k
duration
float64
0
24.9
All right.
4,042.151
0.499
So it doesn't look like all that much progress, frankly.
4,042.65
2.93
My left half of the list is now 4, 8, 2, 6, which is not really sorted.
4,045.58
3.74
But we'll get there.
4,049.32
1.21
What step comes next?
4,050.53
1.55
I've just sorted the right half of the left half of my original list.
4,052.08
4.701
AUDIENCE: [INAUDIBLE].
4,056.781
2.409
SPEAKER 1: You're missing a step.
4,059.19
1.47
AUDIENCE: [INAUDIBLE].
4,060.66
0.97
SPEAKER 1: Merge, that third step.
4,061.63
1.98
Once you've sorted the left half of something,
4,063.61
2
then you've sorted the right half of something.
4,065.61
1.958
Now you have to merge them or weave them together somehow.
4,067.568
2.942
So the left half of the list in the story at the moment is 4 and 8.
4,070.51
3.25
The right half is 2 and 6.
4,073.76
1.75
So here's where mentally you can kind of bring out
4,075.51
2.309
your fingers to think through this sort of conceptually, or in pseudocode code.
4,077.819
3.291
Here's the left list.
4,081.11
1.69
Here's the right list, or the right half.
4,082.8
2.13
So how do I merge these two together?
4,084.93
1.577
Well, it turns out-- and you can see it now.
4,086.507
1.833
Before it was idiotic that we just were merging lists of size 1.
4,088.34
2.85
It's pretty easy.
4,091.19
0.89
Here now, we have something substantive to talk about.
4,092.08
2.51
So I have one list here, one list here.
4,094.59
2.33
Which element from these two lists obviously comes first?
4,096.92
4.67
So 2.
4,101.59
1.11
And so what I'm going to do is then 2 is going to have to come down here.
4,102.7
3.369
And then I can advance my right hand so to speak.
4,106.069
2.491
And now, compare 4 and 6.
4,108.56
1.379
What's going to come next?
4,109.939
1.641
4.
4,111.58
0.72
Now I can advance my left hand.
4,112.3
1.389
I compare 8 and 6.
4,113.689
1.311
Which comes next?
4,115
1.29
6.
4,116.29
0.63
Now, my right hand, its job is done.
4,116.92
1.93
I have only one more to do.
4,118.85
2.31
And this.
4,121.16
0.54
So what's key in the merging is that you essentially
4,121.7
2.6
have this left hand and this right hand concept.
4,124.3
2.49
Each of them kind of steps forward over time, but you never go back.
4,126.79
3.77
You never double back.
4,130.56
1.29
So it's this sort of linear relationship with your left and right hand
4,131.85
2.968
as you're merging the lists together.
4,134.818
1.541
So pictorially, let's see that.
4,136.359
1.5
We compare 4 and 2.
4,137.859
2.091
2 goes first.
4,139.95
1.09
Then, 4.
4,141.04
1.04
Then, 6.
4,142.08
0.92
Then, 8.
4,143
0.649
Where am I in the story?
4,143.649
1.33
I mean, we've been droning on for some time now.
4,144.979
3.09
I have just successfully sorted what?
4,148.069
3.511
The left half of the original list, which means the next step is?
4,151.58
3.568
AUDIENCE: Sort the right.
4,155.148
1.041
SPEAKER 1: Sort the right half of the original list.
4,156.189
2.29
So I can box that in to draw attention to it.
4,158.479
2.181
How do I sort a list of size 4?
4,160.66
1.52
Well, that's really just 2 lists of size 2.
4,162.18
2.13
Let's sort the left half.
4,164.31
1.21
How do I sort a list of size 2?
4,165.52
1.5
Well, that's really just a list of-- 2 lists of size 1.
4,167.02
4.28
Done.
4,171.3
0.5
1 is sorted.
4,171.8
0.929
Done.
4,172.729
0.5
7 is sorted.
4,173.229
0.851
Now I have to merge them together.
4,174.08
1.48
1 comes first, then 7.
4,175.56
3.009
OK, now sort the right half of the right half of the original list.
4,178.569
4.071
OK.
4,182.64
0.85
Sort the left half.
4,183.49
1
Done.
4,184.49
0.55
Right half.
4,185.04
0.6
Done.
4,185.64
0.67
Merge them together into some extra space.
4,186.31
2.629
3, and then 5.
4,188.939
2.271
Now where am I in the story?
4,191.21
1.939
Now I have sorted the left half of the original right half
4,193.149
4.085
and the right half of the original right half,
4,197.234
1.916
so now I have to merge them together.
4,199.15
2.81
So 1, 3, 5, 7.
4,201.96
5.24
Almost there.
4,207.2
0.94
Now we're sort of rewinding in time.
4,208.14
1.94
Now we're at the very first chapter in the story--
4,210.08
2.49
sort left half, sort right half, merge.
4,212.57
2.37
I have that one final merge step.
4,214.94
1.64
So what comes first from the left half and the right half?
4,216.58
3.96
1, 2-- even if you've lost track of the story,
4,220.54
3.43
the answer's going to be 1, 2, 3, 4, 5, 6, 7, 8.
4,223.97
2
But 1, 2, 3.
4,225.97
2.24
But notice what's happening here in effect.
4,228.21
1.97
Whatever code is implementing this, it's as though my right and left
4,230.18
3.67
fingers are just moving from left to right, plucking off the element that
4,233.85
4.72
is indeed then the smallest.
4,238.57
3.61
That was a heck of a lot of work.
4,242.18
1.42
And frankly, that story seemed to take longer to tell than any of the others.
4,243.6
5.64
But what happened?
4,249.24
1.156
And in fact, I've left deliberately, with this little animation
4,250.396
2.624
of sorts, on the screen the remnants of where we came.
4,253.02
2.7