leetcode-43-Multiply Strings

阅读 44

2023-08-23


It is the same as we do multiplication by hand. We can use a array/vector to store it. Then manipulate as we perform in hand.

Error:

  1. Remember, the maximum length of the result is n_1 + n_2 + 1, not max(n_1, n_2) + 1

Updated:

I want to simulate it like normal multiply not like before, so we can directly set s[i + j + 1] not s[i + j] for low position, and s[i + j] for high position.


精彩评论(0)

0 0 举报