





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
W4(a) Lecture Notes (Skrentny) Material Type: Notes; Class: Introduction to Data Structures; Subject: COMPUTER SCIENCES; University: University of Wisconsin - Madison; Term: Spring 2014;
Typology: Study notes
1 / 9
This page cannot be seen from the preview
Don't miss anything!






Homework h2 due 10 pm Friday, February 14th Program p1 due 10 pm Sunday, February 16th
Assignment questions? Post on Piazza or see a TA during lab consulting hours.
Last Time Exceptions
Today Chains of Linked Nodes
Next Time Read: continue Linked Lists Java Visibility Modifiers LinkedList Class - implementing the List ADT with a chain of nodes LinkedListIterator Class
Concept
Goal
Create a chain of nodes containing the Strings "yippie", "ki", and "yay" (in that order)
Assume head points to the first node in a chain of nodes containing Strings.
Write a code fragment that adds “last” to the end of the chain of nodes. You may assume the chain has at least one item.
Assume head points to the first node in a chain of nodes containing Strings.
Write a code fragment to remove the third item from the chain of nodes. You may assume the chain has at least three items.
How would your code change so that it removes the Nth item from the chain of nodes?