CHAPTER 3: LISTS

Presents the list data structure for

efficient traversals

arbitrary insertions and deletions

imposing an ordering on the collection of information it holds

Discusses the limitations of lists for random access

Compares the advantages and disadvantages of lists and arrays for storing data

Discusses the implementation of lists using

records

arrays

pointers

dynamic memory

Stresses the importance of writing functional modules to solve general programming problems and

uses list traversal to convey these techniques

shows how such functional modules can be used as tools and adapted to solve related problems

Explains dynamic storage and its management

Case study?/FONT>the perfect shuffle

illustrates the use of lists and arrays

3.1: Why Are Lists Needed?

3.2: Keeping Track of List Pointers

3.3: Expanding and Contracting Lists

3.4: Traversal of Lists

3.5: Using the Traverse Function for Lists

3.6: Implementing Lists

3.7: Keeping Track of Available Records

3.8: Sequential Arrays versus Lists for Record Storage

3.9: Case Study: Merging and the Perfect Shuffle

Exercises

Suggested Assignments