Given two numbers represented by two linked lists, write a function that returns Sum list. The sum list is linked list representation of addition of two input numbers.
Input: First line of input contains number of testcases T. For each testcase, first line contains size S1 and size S2, length of 2 numbers. The next 2 lines contain, space separated digits of the 2 numbers.
Output: Sum the two numbers and return the result.
User Task: The task is to complete the function addSameSize() addCarryToRemaining().
1 <= T <= 100
1 <= S1, S2 <= 100
2 3 4
3 4 5
5 7 9
Testcase 1: After adding the 2 numbers the resultant number is 5 7 9.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.