2014-03-28 HW

posted Mar 28, 2014, 8:32 AM by Samuel Konstantinovich   [ updated Mar 28, 2014, 8:34 AM ]
Reminder: I posted test cases for 1-5 for your old hw server assignments. You were supposed to use the test cases for the 6th assignment on your own.

Today you are fixing broken code!

Double Linked List idea:

Each element points to the next and to the previous. 
So if you had a list:
A - B - C
A's previous is null.
A's next is B.
B's previous is A.
B's next is C.
C's previous is B.
C's next is null.

There is no head/tail. The only instance variable is current. 

The current node can point to ANY element in the list. It is not always the front or back.
-You can move the current to the next and previous. This is required to access other values.
-Insert will insert AFTER the current node. 
Comments