Algorithms Analysis and Design
CPSC 6109
Syllabus
Calendar
Misc.
Linked Lists Exercises
< Previous
Next >
Inserting and Removing from a Linked List
Make a (traditional) linked list with the following instructions and draw the resulting linked list with nodes like:
+----------+ | element | | next | +----------+
Insert 5
Insert 3
Insert 9
Insert 7
Remove 9
Remove 5
Remove 7
Remove 3
Remove 5
Enumerate the steps taken to build the linked list by labeling each of the actions with a consecutive number
What are the "special cases" or scenarios to test for for each operation (for adding, retrieving or deleting an item)?
________________________________
________________________________
________________________________
________________________________
Last Modified: