You are given twodummy-headed singly linkedlists, write a method in java or python to sum the integers represented in two different lists. The input lists will have single digits in each node. The digits in each node concat to form an integer.
Sample Input
Sample Output
List 1 : x → 4 → 5 → 3
List 2 : x → 9 → 5 → 2
x → 1 → 4 → 0 → 5
Explanation: List 1 represents the integer 453. List 2 represents the integer 952.
453+952=1405. Hence, List 3 contains 1 → 4 → 0 → 5.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here