Created
January 5, 2015 06:45
-
-
Save harrypatton/8b632a7c411438b85f9e 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
public LinkNode CreateLinkNode(int number) { | |
LinkNode dummyHead = new LinkNode (0); | |
LinkNode currentHead = dummyHead; | |
while (number > 0) { | |
currentHead.next = new LinkNode(number % 10); | |
currentHead = currentHead.next; | |
number = number / 10; | |
} | |
return dummyHead.next; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment