CS 240
Lab 5

Purpose:  Practical introduction to the List ADT and its linked list implementation using a pointer-based data structure.

Reading:  Linked list concepts are discussed on pp. 287-294 in the text.  A pointer based implementation of linked lists is discussed on pp. 295-300.

Motivation: 
Last week we simulated a memory storage pool from which we allocated nodes and to which we returned deallocated nodes (similar to what happens when we use the new and delete commands).  This storage pool was managed using a variation of a simple linked list called a linked stack. 

We used the nodes we allocated to populate an ordinary linked list (our "working list").  We made it possible to create a list, check to see if our list was empty, allocate a node from the storage pool, insert a node to our list, search for a node on our list, and remove a node from our list and deallocate it.  We basically did all the things needed to maintain data using a simple linked list structure, except using the data stored for something useful!  This may seem strange, but remember that the point of this class is to learn a variety of data or storage structures and the algorithms to manage them.  For now, we will leave the practical application of the data structures we create to our project assignments.

In addition to learning about linked lists, managing your storage pool should have given you some insigth into what goes on behind the scenes whenever memory is dynamically allocated or deallocated.

This week we will build an ordered pointer-based linked list.  Since we will be dynamically allocating memory using new and deallocating it using delete, you will only have to manage your working list.

Assignment:  Design, implement, and test an ordered pointer-based linked list
Submission:  FTP all source (including READM) files to your FTP account by the due date for your section. 

Last updated:  2/26/07 - RMW & RVS