00:01
Okay, so this problem has two parts.
00:04
The first is we are going to use a hashing function to assign some parking spaces.
00:11
And so we have 31 parking spaces, so we will take their license plate number.
00:19
The first three digits of it, which will be our k, and we will take that mod 31 to assign a parking space.
00:28
So the first parking space we're given is 317.
00:35
And so if we take that mod 31, we're going to get a remainder of 7.
00:44
And we do this by, of course, 31 times 10 would be 310, right, plus a remainder of 7.
00:57
So the 7 is our remainder.
01:00
We can do the same thing for these other ones.
01:06
Okay, so if we have, if we take 918, mod 31, the remainder we'll get for that one is 19.
01:36
Okay, and of course, we have a nice, easy one here, so 0 .07, mod 31 is going to have a remainder of 7.
01:51
So we can already see the problem here.
01:53
We already have two cars headed to the same place.
02:05
Now if we have a license plate of 100, we take that one, mod 31, and that is going to be equal to 7 as well.
02:24
And again, this is done...