Fixed array / contiguous sequence
#Contiguous storage supports indexed access. Searching an unsorted sequence must inspect potentially every element.
Fragment
Inserting into a fixed-size array may require allocating a different array.
Reference
Compare operation costs, ordering, invariants and common algorithm notation.
Abstract data structures and conventional implementations. Costs use a unit-cost RAM model unless stated; n is item count, V vertices, E edges and k key/output length. Native containers can have different contracts. Expected, amortized and worst-case bounds are distinguished.
Contiguous storage supports indexed access. Searching an unsorted sequence must inspect potentially every element.
Fragment
Inserting into a fixed-size array may require allocating a different array.
A resizable contiguous array trades occasional reallocation for cheap appends. Index access remains constant in the standard model.
Fragment
Resizing may move elements and invalidate references/iterators according to the native container.
Links give local insertion/removal when the required nodes are already known. Finding a position by index still requires traversal.
Fragment
A singly-linked delete often also needs its predecessor. Node allocation and poor locality are additional costs.
Push/pop operate at one end. A linked stack has worst-case constant basic operations; a dynamic-array stack has amortized constant push.
Fragment
Searching or indexing arbitrary stack entries is outside the basic stack interface.
A linked queue with head/tail or a properly implemented ring buffer supports constant-time enqueue/dequeue, apart from resizing.
Fragment
Removing the first element of an ordinary contiguous array by shifting is O(n).
A deque supports both ends. Ring buffers reuse a bounded region through modular indexing.
Fragment
Full-buffer behavior is a contract: reject, block, grow or overwrite. Do not assume one.