3 ms·
The code for multiplication is correct, but the explanation is not: > Here, we're using the fact that x * y = x + (x - 1) * y. We recursively calculate the sec
by two_handfuls 3y ago
The code for multiplication is correct, but the explanation is not:
> Here, we're using the fact that x * y = x + (x - 1) * y. We recursively calculate the second term, and then add it to the first factor!
It should say
x*y = y + (x-1)*y.