Created
October 20, 2011 18:05
-
-
Save klaeufer/1301827 to your computer and use it in GitHub Desktop.
Loyola University Chicago Comp 373/473 Project 2a Sample Test Case 3
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
struct ListNode { value, next }; | |
var n; | |
var h; | |
var s; | |
n = new ListNode; | |
h = n; | |
n.value = 2; | |
n.next = new ListNode; | |
n = n.next; | |
n.value = 3; | |
n.next = new ListNode; | |
n = n.next; | |
n.value = 5; | |
n.next = new ListNode; | |
n = n.next; | |
n.value = 7; | |
n.next = 0; | |
n = h; | |
while (n) { | |
s = s + n.value, | |
n = n.next | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment