SortedListTKeyTValue
SortedList<TKey, TValue> is a generic collection that stores key-value pairs while maintaining the entries in order of their keys. Keys are required to be unique, while values may be duplicated. The collection exposes fast lookups by key and provides enumeration of the pairs in ascending key order. A custom comparer can be supplied to define a non-default sort order for the keys.
Typical features include access by key through an indexer, and optional access by index to retrieve a
In terms of performance, lookups by key are usually logarithmic in time, while insertions and removals that
Common use cases include scenarios where a sorted iteration over keys is important, and where frequent key-based