Created
December 7, 2017 17:33
-
-
Save nhuntwalker/e914641582924aa5657bd8d77c9fceb8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add Linked Lists of Numbers | |
You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the 1's digit is at the head of the list. Write a function that adds the two numbers and returns the sum as a linked list. | |
Ex: | |
438 + 123 = 561 | |
[ 8 ] -> [ 3 ] -> [ 4 ] | |
+ | |
[ 3 ] -> [ 2 ] -> [ 1 ] | |
= | |
[ 1 ] -> [ 6 ] -> [ 5 ] | |
email to nicholas@codefellows.com by 10am |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment