Linked Lists
This section is based on parts 18, 19 and 20 of the notes,
Implementing Lisp lists,
Implementing ArrayLists using linked lists,
and
Variations on ArrayLists using linked lists.
Practical exercises supporting this section are in
Exercise sheet 9.
When you have completed this section you should be able to:
- Write a class which implements a simple list-like abstract data type
- Appreciate that arrays and linked lists are two different data
structures which may be used to implement list-like abstract data
types
- Write code which manipulates linked list in Java, and use cells and
pointers diagrams to illustrate the effect
- Appreciate the need to write your own equals method when you are
implementing an abstract data type
- Understand the doubly linked-list data structure
- Know why the Java code library provides the
ArrayList
and
LinkedList
classes
Matthew Huntbach
Last modified: 30 June 2006