Skip to main content

Add Two Numbers

Add two numbers represented by linked lists in reverse order Example: [2,4,3], [5,6,4] => [7,0,8] (342 + 465 = 807)

Digits arrive reversed, which is exactly the order arithmetic wants. I carry across nodes, then do the same for subtract and multiply.

Linked ListMath & Geometry

Meet Coco

Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Sign in free to type with Coco, up to a daily limit, and to talk with her for one hour. After that, talking comes with the $79 pack. Anyone can open the editor and run their code.

1Add Two Numbersmedium
2Part 2
3Part 3

Each locked part opens in the editor once the part before it passes.

Based onLeetCode

Prep guides that list this problem

Our company tags come from public interview write-ups. None of these is a confirmed question.

Get a note when something new lands

New company guides, new problems and big changes to Coco. Rare, and you can leave any time. By joining you agree to get these emails.