S
All challenges
Practice
Home
Blog
Practice
Examples
Feedback
Add Two Numbers as Linked Lists
00:00
Start
00:00
Sign in
Problem
Hints
3
Solution
History
Medium
Linked List
Math
Simulation
Amazon
Microsoft
Add two numbers represented as reversed linked lists. Return sum as reversed linked list.
Examples
Example 1
Input →
2
Output →
4→3 + 5→6→4 → 7→0→8
Note:
342+465=807
Example 2
Input →
0 + 0
Output →
0
Example 3
Input →
9
Output →
9→9 + 9→9→9→9 → 8→9→9→0→1
Note:
999+9999=10998
JavaScript
Python
Java (Coming soon)
C (Coming soon)
C++ (Coming soon)
Reset
Run
Submit
Cases
Results