The idea is to use recursion to compute the sum. Reverse both the linked lists to start from the least significant digit. Now, traverse both the linked list recursively and in each recursive add the values of the current nodes and the carry from the previous step (initially, carry = 0). If there is a carry after the last nodes, append a new node with this carry. Finally, reverse the linked list to get the sum.
Output
1 1 2 2
Time Complexity: O(m + n), where m and n are the sizes of given two linked lists. Auxiliary Space: O(max(m, n))