Data Structures & Algorithms Lecture Notes

1 October 2010 • List Traversal


Outline

Why Traversals?

Group Operations

Simple Group Operations

Capable Group Operations

Simple vs Capable

References

Example

for (i = er.first(); i.hasMore(); i.next())
  List<Patient>.reference sickest = i;
  for (j = i.next(); j.hasMore(); j.next())
    if j.value().sicker(sickest.value())
      sickest = j
  er.swap(i, sickest)

Traversals

But First...

Creating Iterators

Iterator References

Implementing Iterators

Iterator Methods

Iterator Under Change

List Extremes

List Traversal

External Traversals

Internal Traversals

Comparison

InEx Traversals

Summary

References


This page last modified on 4 February 2010.

Creative
    Commons License