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

Purge Method

Program gif gives the code for the Purge method of the LinkedList class. The purpose of this method is to discard the current list contents and to make the list empty again. Clearly, the running time of Purge is O(1).

   program3749
Program: LinkedList class Purge method.


next up previous contents index

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