LeetCode Algorithms Solved

Algorithms at your fingertips

Leetcode Algorithm : Add Two Numbers

This is another simple problem that deals with linked list traversals and carrying forward the addendum.

Input :

l1 = [9,9,9,9,9,9,9],
l2 = [9,9,9,9]

Two Lists can be added just like the regular summation with LSB starting from beginning of the list.

9,9,9,9,9,9,9

9,9,9,9

=================

8,9,9,9,0,0,0,1

=================

Posted in

Leave a comment