Lab 6 — Lists

 

Due: Wednesday, October 18.

In this lab you are to experiment with two implementations of lists. In the standard implementation, the lists will take any java object. In the second, the lists are designed specifically for integers. Further, the second list type includes a tail pointer to make insertion faster. Your job is to test the efficiency of each kind of list against each other. The way to do it is simply to make lists and do large numbers of list operations.

The relevant material will be in a folder called Lists in the course material folder.

You will need to generate random numbers in order to do random list operations. Check the QuickSort program you worked on to see how this is done.

Think through this assignment as an experiment. What do you want to accomplish? How can your results make your point? You will be graded on how effectively you make your arguments.

Some things to consider: 1) Different list operations will be afffected by the length of the list. 2) Some list operations won't work on empty lists (which means you should try and ensure that there won't be empty lists).

What to hand inYour program and a writeup comparing the efficiency of each kind of list. Try to make your judgements as qualitative as possible (e.g. don't say "fast lists are faster than slow lists," say things like "slow list operations grow at a 40% rate as a function of list length versus fast lists."). Assume that I know nothing and it is your job to tell me everything that is relevant for a large implementation that I am going to do.