text
stringlengths
1
81
start
float64
0
10.1k
duration
float64
0
24.9
from one node to another such that each of those elements in the array is
6,064.4
5.08
a pointer to another array.
6,069.48
1.75
And if you keep following these pointers, following the bread crumbs
6,071.23
3.05
and you eventually find yourself at this special sentinel value--
6,074.28
3.61
and actually, it wouldn't be null, it would be like a Boolean saying true.
6,077.89
3.74
This is a word you can just by storing a single yes or no at this location way
6,081.63
5.76
down here, implicitly reveal that M-A-X-W-E-L was in fact a word.
6,087.39
7.995
Let's follow another.
6,095.385
0.875
So, let's say Turing, T-U-R-I-N-G, check, Boolean true.
6,096.26
10.88
Turing is in this dictionary as well.
6,107.14
2.42
So, if there are bread crumbs that lead to null, that word is not in here.
6,109.56
3.9
So, apparently there is no names starting with A through L,
6,113.46
4.3
and there is no one after U through Z or some of the letters in between,
6,117.76
3.99
because those pointers are implicitly and pictorially null.
6,121.75
3.23
But let's consider, then, what is the running time of inserting or looking up
6,124.98
4.92
a name and [? in a trie? ?] Thus far, pretty much all of the data
6,129.9
4.22
structures we've talked about have pretty slow running times,
6,134.12
3.86
linear in the worst case.
6,137.98
1.84
So, if we used an array to store people's names
6,139.82
2.55
or we used to linked list to store people's names, in the worst case
6,142.37
3.152
we had linear running time, unless maybe we sort things, but even
6,145.522
2.708
then that costs us some time.
6,148.23
1.208
So, linear may be logarithmic was the best we could do.
6,149.438
3.192
And even with a hash table, whereby, maybe we
6,152.63
2.75
store Maxwell at the M location in our table,
6,155.38
2.65
he might still have a link list of a whole bunch of other M people.
6,158.03
3.49
That, again, can devolve into something linear, a linear linked list.
6,161.52
3.99
But what about a hash table?
6,165.51
2.13
To answer the question is Maxwell in a trie-- sorry, what about to trie?
6,167.64
5.14
To answer the question is Maxwell in a trie, what do we do?
6,172.78
3.6
We start at the root and we follow the pointer that represents m,
6,176.38
3.96
and then we follow the pointer there that represents A, then X, W, E, L, L,
6,180.34
4.31
and we look for at the end of that series of steps a true false value.
6,184.65
3.73
And if it's true, yes, Maxwell is here.
6,188.38
3.15
What about Turing?
6,191.53
0.89
Well, we start at the pointer that represents
6,192.42
1.875
T, then U, R, I, N G, then check.
6,194.295
1.865
Oh, true.
6,196.16
1.43
Turing is in there.
6,197.59
1.27
Let's look for David.
6,198.86
1.22
No, false.
6,200.08
1.27
There's not even a pointer there.
6,201.35
1.52
David is not in this dictionary.
6,202.87
2.08
So, how many steps did that each take?
6,204.95
1.95
To tell whether Maxwell was in the dictionary,
6,206.9
2.2
was M-A-X-W-E-L-L and then look at the Boolean, so that was eight steps.
6,209.1
5.51
And to look up Turing was T-U-R-I-N-G. And then that Boolean,
6,214.61
4.84
that was seven steps.
6,219.45
2.91
Those numbers have nothing to do with how many words are already in the trie.
6,222.36
5.66
There might be-- and there's only a couple dozen here--
6,228.02
2.94
there are a dozen or so here-- there might be thousands of actual words
6,230.96
3.48
in this dictionary, but we're still going to find Alan Turing by way
6,234.44
4.15
of T-U-R-I-N-G Boolean seven steps, and M-A-X-W-E-L-L Boolean, eight steps.
6,238.59
7.74
It doesn't matter how many other data elements are in this trie.
6,246.33
4.21
And that's what's powerful, because if there
6,250.54
2.48
is an upper bound on the number of letters in an English
6,253.02
2.56
word-- which is kind of true.
6,255.58
2.14
I've rarely typed words that are longer than I don't
6,257.72
2.62
know 10 characters, 15 characters.
6,260.34
1.81
At some point there might exist these words,
6,262.15
2.5
but no one actually says or types these words.
6,264.65
2.63
Those are effectively constants.
6,267.28
1.63
The maximum length of a word in English is surely some constant,
6,268.91
3.096
because there is one word that's the longest.
6,272.006
1.874
That's a constant value, which means inserting a name,
6,273.88
3.18
or searching for a name, or removing a name from a trie
6,277.06
4.26
does depend on the length of the name, but it does not
6,281.32
2.7
depend on how many pieces of data are already in the data structure.
6,284.02
3.95
And as such, it is constant time.
6,287.97
4.05
So, now in C, we have a whole bunch of new syntax
6,292.02
2.3
with which to represent data structures, namely actual structs in C,
6,294.32
3.315
and we have pointers, and we have malloc with which
6,297.635
2.125
we can build more interesting shapes, if you will, in memory.
6,299.76
2.99
And we now have a number of abstract data types and actual data structures
6,302.75
4.1
we can build using these ingredients with which we can now solve problems
6,306.85
4.142
that are going to demand all the more resources, all the more time, all
6,310.992
2.958
the more space, in which case efficiency and good design
6,313.95
3.24
is going to be ever more important.
6,317.19
2.3
All this and more next time.
6,319.49
2.34
6,321.83
4.394
AUDIENCE: She thought she was doing the right thing.
6,326.224
2.166
6,328.39
4.975
[AUDIO PLAYBACK]
6,333.365
2.85
-Tell me more.
6,336.215
2.375
-David was sure it had to be the muppet, something called muppet mode,
6,338.59
6.7
but the pressure was too much.
6,345.29
2.86
-This is Mario in muppet mode.
6,348.15
1.37
Take 23.
6,349.52
0.71
6,350.23
4.99
[HONKING]
6,355.22
2.45
6,357.67
14.71
-What's happening?
6,372.38
1.048
I thought this is what you always wanted,
6,373.428
2.302
to star in the walkthrough videos, to have all of YouTube's eyes
6,375.73
3.52
watching you.
6,379.25
2.5
[HONKING]
6,381.75
0.5
6,382.25
5.74
-Yes, you are.
6,387.99
1.96
You have to be.
6,389.95
1.53
Now stand up straight, tuck in your shirt, look into the camera!
6,391.48
3.662