Skip to content

Files

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 1, 2024
Jul 1, 2024
Jul 1, 2024
Jul 1, 2024

Properties of vectors

- Add from back -> O(1)
- Delete from back -> O(1)

- Add from anywhere -> O(N)
- Delete from anywhere -> O(N)

- Access with ([] or .at()) -> O(1)
- Search with find() -> O(log N)

- Advantages:
    - Implemented as dynamic arrays

- Drawbacks:
    - Expensive reallocation
    - Requires contiguous memory