Andrunevchyn

Andrunevchyn


notes and issue research

November 2016
M T W T F S S
    Jan »
 123456
78910111213
14151617181920
21222324252627
282930  

Categories


LeetCode: 2. Add Two Numbers

Andriy AndrunevchynAndriy Andrunevchyn

My first task on LeetCode

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.

Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
Output: 7 -> 0 -> 8

 

and ListNode class

 

Comments 0
There are currently no comments.

Leave a Reply