lab4_001 - 15-121 FALL 2009 [CORTINA]LAB 4image by Una...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 15-121 FALL 2009 [CORTINA]LAB 4image by Una WoodruffIn this recitation, you will implement methods for a circularly singly-linked list. In this type of list, there is one reference to the head of the list. The last node of the list has a next reference that points back to the head of the list. EXERCISESDownload the CircularlyLinkedList.zipproject file. This project contains a CircularlyLinkedList class that will model a circular singly-linked list as shown above. The constructor is given for you, creating an empty circular list. There is also a private inner class to represent a node in the list. The project also includes a class ListTesterthat tests the methods that you will write. Read this file over quickly to see what tests are performed and determine what the expected output should be for each set of instructions. 1. In the CircularlyLinkedListclass, complete the addmethod that inserts the new entry into the circular list. Insert the new entry into the list so that the insert operation is always O(1), regardless the circular list....
View Full Document

Page1 / 2

lab4_001 - 15-121 FALL 2009 [CORTINA]LAB 4image by Una...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online