Search⌘ K
AI Features

Solution: Add Two Numbers II

C# solution for the Add Two Numbers II problem using the Stacks pattern.

We'll cover the following...

Statement

You are given two non empty singly linked lists l1 and l2 that represent two non negative integers. Each node stores a single digit in Node.val, and the digits are ordered from most significant to least significant.

Return the sum of the two numbers as a singly linked list in the same most significant to least significant digit order.

Note: Follow up: can you solve this without reversing the input lists?

Constraints:

  • The number of nodes in each of l1 and l2 is in the range [1,100][1, 100].

  • 00 \leq ...