How to solve Add Two Numbers as Linked Lists
Each linked list stores a reversed sequence of decimal digits; return the sum in the same format. Add digit by digit and carry into the next position. The reference implementation illustrates this approach; check the example and edge cases.
Time and space complexity
O(max(n,m)) time and output space.
Practise and improve
Choose JavaScript, TypeScript or Python, complete the starter code, then select Run Tests. Request a hint when you need guidance, or choose View solution and confirm if you would like to study the reference implementation.