Facebook | Phone | Enterprise Engineer | Addition of String Numbers
Anonymous User
4886

Problem: Given 2 strings str1 and str2, which represent numbers in string, perform addition of the numbers and return the result as a string.

Example 1: str1 = "123.52" and str2 = "11.2", output should be "134.72"
Example 2: str1 = "110.75" and str2 = "9", output should be "119.75"

Constraints: You may not convert entire string to integer directly. Strings may be null and will always have values >=0.0

Comments (22)