当前位置 : 主页 > 手机开发 > harmonyos >

leetcode-43-Multiply Strings

来源:互联网 收集:自由互联 发布时间:2023-08-26
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: Remember, the maximum length of the result is n_1 + n_2 + 1, not max(n_1, n_2) + 1 Updated: I want to simul


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.


上一篇:leetcode-13-Roman to Integer
下一篇:没有了
网友评论