Vector vs. deques.Vectors are used to store contiguous elements like an array. However, unlike arrays, vectors can be resized Dequeues, are double ended queues that store elements in a linear order. They allow elements to be accessed at any position.Vector vs. deques.- Vector supports dynamically expandable array. - Deque is double ended queue. Deque elements can be accessed from both the ends while vector elements can be accessed using subscript notion.
|