Data Structures and Algorithms with Object-Oriented Design Patterns in Python
next up previous index

LinkedList Properties

Three LinkedList properties are defined in Program gif. The head and tail properties provide accessors for the corresponding instance attributes of LinkedList. The isEmpty property provides an accessor that returns a bool result which indicates whether the list is empty. Clearly, the running time of each accessor is O(1).

   program3866
Program: LinkedList class properties.


next up previous index

Bruno Copyright © 2003, 2004 by Bruno R. Preiss, P.Eng. All rights reserved.