Data Structures and Algorithms
with Object-Oriented Design Patterns in C# |
Three LinkedList properties are defined in Program . 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).
Program: LinkedList class properties.