Data Structures and Algorithms
with Object-Oriented Design Patterns in C#![]() ![]() ![]() ![]() ![]() |
The Withdraw method is used to remove a specific
object instance from an ordered list.
The implementation of the Withdraw method for
the OrderedListAsLinkedList class
is given in Program .
Program: OrderedListAsLinkedList class Withdraw method.
The implementation of Withdraw is straight-forward:
It simply calls the Extract method provided by
the LinkedList class
to remove the specified object from linkedList.
The running time of the Withdraw method is dominated
by that of Extract which was shown in Chapter
to be O(n), where n is the number of items in the linked list.