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.
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.
Inserts a collection of elements into this deque.
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.