054:字符串相乘
LeetCode 43 https://leetcode.cn/problems/multiply-strings/description/ 难度:中等 高频面试题汇总:https://www.yuweihung.com/posts/2025/lc-hot/ 高精度乘法,模拟竖式计算。 为了方便处理进位,先用一个倒序的 int 类型数组来存储计算结果,最后再将结果转回字符串。 数组的长度初始化为 m + n,如果最高位为 0,则将长度减一。 时间复杂度:O(mn)。 空间复杂度:O(m+n)。 ...