← Array | Vector | List →
Exit Slides

Summary

Vectors are dynamic_array structures with contiguous_memory and zero_based_indexing. They provide random_access in O(1). Two numbers matter: size (elements stored) and capacity (space reserved). Growth uses amortized_growth, so push_back is usually O(1). Middle updates with insert or erase shift elements and are O(n). Iterate with index_iteration or iterator_iteration. Access is fast but may be bounds_unsafe unless using bounds_checked_access. Data stays contiguous for cache-friendly iteration and copying.
Slide 1 / 2