Corning Community College
Assignments, Documents, Information, and Projects
-
To continue with our linked list, I'd like for you to extend last week's project by implementing the other functions as mentioned in the
singly linked list project.
There are 12 in total listed.. try to have at least 6 of them done by 20140221.
Implement these as standalone functions (which can call each other if need be– including insert(), append(), and getNode()).
Note: unless intentionally designed to do I/O (display() being the only one so far), none of these functions should do any I/O. Just processing.
Incorporate some test into your code to verify the proper operation of these new list functions.
Testing your linked list in general. Try some of the typical first-time implementation gotchas:
Inserting before the start of the list (first node, which is node 0)
Inserting before the second node
Appending after the start of the list (first node, which is node 0)
Appending after the second node
getNode() on first and second nodes of the list
A suggested style for your display() functions could be as follows:
start: [0] 23 -> [1] 47 -> [2] 59 -> [3] 16 -> [4] 7 -> [5] 11 -> NULL
Note the node position prefixing each node's contents, for easier addressing when allowing the user to interactively perform insert/append/getNode on specific nodes.