题目描述
Given two numbers as strings s1 and s2. Calculate their Product.
Note: The numbers can be negative and You are not allowed to use any built-in function or convert the strings to integers.
Example 1:
Input:
s1 = "33"
s2 = "2"
Output:
66
Example 2:
Input:
s1 = "11"
s2 = "23"
Output:
253
Your Task: You don't need to read input or print anything. Your task is to complete the function multiplyStrings() which takes two strings s1 and s2 as input and returns their product as a string.
Expected Time Complexity: O(n_{1}* n_{2})
Expected Auxiliary Space: O(n_{1 }+ n_{2}); where n_{1} and n_{2} are sizes of strings s1 and s2 respectively.
Constraints:
1 ≤ length of s1 and s2 ≤ 10^{3}
输入格式
见题面
输出格式
见题面
样例输入
s1 = "33"
s2 = "2"
样例输出
66