Given two non-negative integers, num1 and num2 represented as string, return the sum of num1 and num2 as a string.

You must solve the problem without using any built-in library for handling large integers (such as BigInteger). You must also not convert the inputs to integers directly.

&nbsp;
Example 1:

Input: num1 = "11", num2 = "123"
Output: "134"


Example 2:

Input: num1 = "456", num2 = "77"
Output: "533"


Example 3:

Input: num1 = "0", num2 = "0"
Output: "0"


&nbsp;
Constraints:


	1 &lt;= num1.length, num2.length &lt;= 104
	num1 and num2 consist of only digits.
	num1 and num2 don't have any leading zeros except for the zero itself.


class Solution:
    def addStrings(self, num1: str, num2: str) -> str:
        def func(n):
            value = {'0':0, '1':1, '2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9}
            result = 0
            for digit in n:
                result = 10 * result + value[digit]

            return result

        ans = func(num1) + func(num2)
        return str(ans)
import java.math.BigInteger;
class Solution {
    public String addStrings(String num1, String num2) {
        return new BigInteger(num1).add(new BigInteger(num2)).toString();
    }
}
class Solution {
public:
    string ans="";
    int carry=0;
    string addStrings(string num1, string num2) {
        while(num1.size() && num2.size()){
            int sum= (num1.back() -'0' + num2.back() -'0' + carry) ;
            ans = (char)((sum%10) + '0') + ans;
            carry= sum/10;
            num1.pop_back();num2.pop_back();
        }

        while(num1.size()){
            int sum= (num1.back() -'0' + carry) ;
            ans = (char)((sum%10) + '0') + ans ;
            carry= sum/10;
            num1.pop_back();
        }
        while(num2.size()){
            int sum= (num2.back() -'0' + carry) ;
            ans = (char)((sum%10) + '0') + ans ;
            carry= sum/10;
            num2.pop_back();
        }
        if(carry) ans = (char)(carry+'0') + ans;
        return ans;

    }
};
var addStrings = function(num1, num2) {
    let i = num1.length - 1;
    let j = num2.length - 1;
    let carry = 0;
    let sum = '';
     
    for (;i >= 0 || j >= 0 || carry > 0;i--, j--) {
        const digit1 = i < 0 ? 0 : num1.charAt(i) - '0';
        const digit2 = j < 0 ? 0 : num2.charAt(j) - '0';
        const digitsSum = digit1 + digit2 + carry;
        sum = `${digitsSum % 10}${sum}`;
        carry = Math.floor(digitsSum / 10);
    }
    
    return sum;
};
Add Strings