Multiply Strings

Given two non-negative integers num1 and num2 represented as strings, return the product of the two numbers, also as a string. This problem tests manual digit handling and carry propagation for large values.

Input Format

num1 and num2 = non-negative integer strings

Output Format

product as a decimal string

Constraints

  • 0 <= num1.length, num2.length <= 200; num1 and num2 contain only digits

Examples

Example 1:

Input:

num1 = "2"
num2 = "3"

Output:

6

Explanation:

2 × 3 = 6.

Example 2:

Input:

num1 = "123"
num2 = "456"

Output:

56088

Explanation:

123 × 456 = 56088.

Loading...
Multiply Strings - Math DSA Problem