3 ms·
It is usually implemented as linked arrays. For example, arrays of 16 or 64 elements, if it grows over that size, new arrays or vectors are used underneath. Tw
by Shorel 4y ago
It is usually implemented as linked arrays. For example, arrays of 16 or 64 elements, if it grows over that size, new arrays or vectors are used underneath.
Two consecutive elements are probably in the same array, and that helps with cache locality.