Leetcode, Add Two Numbers, Programming, Leetcode Medium, Java.
length of the longer list. Space Complexity: O(n), the space complexity is determined by the space required to store the result linked list. Since a new node is created for each digit of the sum, the space complexity is proportional to the length of the resulting list, which is O(n). The auxiliary