Skip to content

You are given two numbers as linked lists of digits in reverse order. Add them and return the sum as a linked list.

Whether you carry correctly and whether you handle the two lists being different lengths without writing the loop twice.

CodingWarm-up

Who reports being asked this

Adobe · Amazon · Apple · Bloomberg · Microsoft · Oracle

Attested by 2 independent sources, including 2 first-hand reports, most recently around 2025-02.

What a strong answer does

The important observation is that the digits are stored in reverse order for a reason. If the list is 2 -> 4 -> 3, that represents 342, but the first node is the ones digit. That is exactly the column you would add first by hand. So you do not need to reverse either list or compute the integer value; you can walk forward through both lists while performing ordinary grade-school addition from least significant digit to most significant digit.

All interview questions