0002. Add Two Numbers

Medium — Linked List, Math, Recursion

Elementary Math
Recursive
+
▶ 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))