Add Strings
num1 and num2 are non-negative whole numbers written as digit strings. Return their sum as a string. Add digit by digit with a carry, like on paper, without converting the whole strings to integers.
Example 1
num1 "11"
num2 "123"
returns "134"
11 + 123 = 134.
Example 2
num1 "999"
num2 "1"
returns "1000"
The carry makes a new digit: 1000.
Constraints
1 <= len(num1), len(num2) <= 20- Digits only, no leading zeros except the number
0itself
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.