Skip to content

Instantly share code, notes, and snippets.

@aybabtme
Created September 17, 2012 20:10
Show Gist options
  • Save aybabtme/3739487 to your computer and use it in GitHub Desktop.
Save aybabtme/3739487 to your computer and use it in GitHub Desktop.
Horror in my CSI2110 Lab
ListNode nNode = new ListNode();
nNode.data = 1;
DLinkedList list = new DLinkedList();
list.firstNode = nNode;
list.lastNode = nNode;
// add items to linked list
for (int i = 2; i < 11; i++) {
nNode = new ListNode();
nNode.data = i;
list.AppendNode(nNode);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment