Data Structures - Lab 10

Tuesday, October 27th

Creating an indexed list from a linked-list


The Lab

The format of this week's lab is very much like last week's lab.  Can you implement some code to create/finish a data structure?

 

Last week, in lecture (sessions 26 and 27), we talked about the concept of an indexed list built on top of an array.

Our final code developed in class looked like this ( arrayIndexedList.py ) and should be very similar to the code presented on page 659-660 in your textbook.


We also talked BRIEFLY about creating an indexed list built on top of a linked list.  Your author provides PART of the class that would implement this class on page 661-662 in your book.  You can download this code below

 

You will notice that the author has left empty three of the methods required for complete implementation of this class

Your assignment for this week's lab is to complete those three methods.

 

Think about each method carefully and how you can use what you know (and what each class knows) to implement a solution for each problem.  Once you have each method working, TEST IT CAREFULLY.  Your grade for this lab will be based both on attempting the solution but also on having it working correctly.

 


To get credit for this assignment you should submit your final/completed  linkedIndexedList.py via the homework submission system no later than the start of class on Wednesday.

 

If you finish prior to the end of class you may leave or you may stick around and work on PA05