Data Structures and Algorithms with Object-Oriented Design Patterns in C#
next up previous contents index

LinkedList Properties

Three LinkedList properties are defined in Program gif. The Head and Tail properties provide get accessors for the corresponding fields of LinkedList. The IsEmpty property provides a get accessor that returns a bool result which indicates whether the list is empty. Clearly, the running time of each accessor is O(1).

   program3768
Program: LinkedList class properties.


next up previous contents index

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