Implementations

Implementations can differ in the runtime efficiency of their operations.

In the following table we assume:

n = number of elements in the collection
i = position
d = min(i, n – i) = distance to nearest end
o = object to be added or removed
O(f(n))a = amortized complexity = f(n)