00:01
Okay, so here we trace out the steps used by the algorithm to compute, well, six factorial.
00:07
Okay, so first, while we use the recursive step to write, well, six factorial, is, well, equal to six times five factorial.
00:18
Okay, and then we use the recursive step repeatedly.
00:22
Repeatedly.
00:25
So basically we get, well, 5 factorial is equal to 4, 5 times 4 factorial, and then 4 factorial is equal to 4 times 3 factorial.
00:36
3 factorial is equal to 3 times 2 factorial, 2 factorial is equal to 2 times 1 factorial, and 1 factorial is equal to 1 times 0 factorial.
00:47
Okay, so inserting here, we know that zero factorial, right, is equal to one.
00:55
So then just looking backwards, we get that one factorial is equal to, well, one times one, which is equal to one.
01:05
And then two factorial is equal to, well, two times one factorial, two times one factorial, which is equal to, well, two times one factorial, which is equal to, 2 times 1, which is equal to 2.
01:23
Okay, and then 3 factorial, so 3 factorial is equal to, well, 3 times 2, which is equal to 2, we found that 1, so it is equal to 3 times 2, which is equal to 6...