Given two non-empty linked lists representing two non-negative integers with digits stored in reverse order (one digit per node), add the two numbers and return the sum as a linked list in the same reversed-digit format.
l1 = [2,4,3], l2 = [5,6,4][7,0,8]l1 = [9,9], l2 = [1][0,0,1]Solve it in the editor. Sign in free to run your Python or JavaScript against test cases, get a verdict, and track your attempts.
Solve on FeatCode →A chain of nodes, each pointing to the next. No random access like an array, but insertion and deletion at a known position is O(1), and many classic problems come down to careful pointer rewiring.
Read the full Linked List guide →
Original problem on LeetCode ↗