Nito.Collections.Deque<T>
public sealed class Deque<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IReadOnlyList<T>, IReadOnlyCollection<T>, IList, ICollection
A double-ended queue (deque), which provides O(1) indexed access, O(1) removals from the front and back, amortized O(1) insertions to the front and back, and O(N) insertions and removals anywhere else (with the operations getting slower as the index approaches the middle).
Gets or sets the capacity for this deque. This value must always be greater than zero, and this property cannot be set to a value less than Count.
Gets the number of elements contained in this deque.
Gets or sets the item at the specified index.
Initializes a new instance of the Deque<T> class with the specified capacity.
Initializes a new instance of the Deque<T> class with the elements from the specified collection.
public Deque()
Initializes a new instance of the Deque<T> class.
Inserts a single element at the back of this deque.
Inserts a single element at the front of this deque.
Removes all items from this deque.
Returns an enumerator that iterates through the collection.
Determines the index of a specific item in this list.
Inserts an item to this list at the specified index.
Inserts a collection of elements into this deque.
Removes the first occurrence of a specific object from this list.
Removes the item at the specified index.
Removes and returns the last element of this deque.
Removes and returns the first element of this deque.
Removes a range of elements from this deque.
Creates and returns a new array containing the elements in this deque.