Add Strings
String Math
Problem
Given two non-negative integers num1
and num2
represented as string, return the sum of num1
and num2
.
Thought Process
This is very similar to Add Binary
Have to remember that we can have potentailly have carry so we need a variable for this
Solution
Key Points
We have to remember there can potenially be a carry variable if the sum of two digits is greater than 9
Time Complexity
Last updated
Was this helpful?