objectSolution{ defaddStrings(num1: String, num2: String): String = { var i = num1.length - 1 var j = num2.length -1 var carry = 0
var ans = Seq[Int]()
while (i >= 0 || j >=0 || carry !=0) { val x = if (i < 0) 0else num1(i) - '0' val y = if (j < 0) 0else num2(j) - '0' val result = x + y + carry carry = result / 10 ans = ans :+ result % 10 i -= 1 j -= 1