← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
You are given two non-negative integers represented as strings, num1 and num2. Your task is to return the sum of these two numbers as a string. You must not use any built-in library that can handle arbitrarily large integers (such as BigInteger in Java), nor may you convert the entire input strings to integers directly. Instead, simulate the manual digit-by-digit addition process you would perform on paper: start from the rightmost digits, add corresponding digits together with any carry, record the current digit (sum modulo 10), propagate the carry (sum divided by 10), and continue until all digits and any final carry are processed.