Multiply Strings

mediumMath & Geometrydigit-by-digit multiplication into result arraySolve on LeetCode#43

Part of Practice: Digits & Points

Given two non-negative integers as strings num1 and num2, return their product as a string. You may not convert the inputs to integers directly or use big-integer libraries — the numbers can be 200 digits long, so the point is to implement multiplication itself.

Constraints that matter: up to 200 digits each, no leading zeros in the inputs (except the number "0" itself), so an O(len1 × len2) digit-by-digit method is expected.

Examples

Input:
num1 = "2", num2 = "3"
Output:
"6"
Input:
num1 = "123", num2 = "456"
Output:
"56088"
Input:
num1 = "99", num2 = "99"
Output:
"9801"

Worst-case carries: every digit pair produces 81 plus whatever carried in.

Hints

One at a time — struggle first, peek second.

Your thinking space — verify on LeetCode, then mark it.