0002. Add Two Numbers
Medium — Linked List, Math, Recursion
← 0001. Two Sum
0003. Longest Substring →
Elementary Math
Recursive
+
Apply
Preset:
342 + 465 = 807
0 + 0 = 0
9999 + 999 = 10998
🎲 Generate
▶ Play
▮▮ Pause
⏭ Step
↺ Reset
Speed:
Slow
Normal
Fast
Very Fast
▶ Press "Play" or use "Step" to walk through step by step.
Step
0 / 0
Operations
0
Time
—
Space
—
Default
Active
Carry
Result
Processed
Algorithm Complexity
Naive (Array Build)
O(m+n)
O(m+n) / O(m+n)
Elementary Math
O(max(m,n))
O(max(m,n)) / O(max(m,n))
Recursive
O(max(m,n))
O(max(m,n)) / O(max(m,n))