A class library containing various collections that are not part of the .NET Framework.
While the framework does contain the LinkedList<T>
class (which represents a doubly-linked list), this class does not implement IList<T>
. I wanted to provide a lightweight collection that did not incur the allocation overheads of an array-backed list, but still allowed indexing and sorting.
A common use case for a singly-linked list would be when working with a highly-variable number of elements, or when frequently inserting and removing elements from the start of the list.
There is no built-in implementation of a binary search tree in the framework, so this generic class is provided to bridge that gap. This collection type is inherently sorted (using an IComparer<T>
) and therefore useful in any application where this is important. Reverse traversal is also very efficient, incurring no overheads compared to forward traversal.