Advanced Topic 23.1
Implementation of Vector
- Built on an array, allocated from the heap
- Store a pointer, the size and the capacity
- Usually larger than needed
- When needed vector will
- get a new buffer, at least double the previous size
- copy elements over
- push_front and pop_front would be O(n) tasks,
so, not implemented
prev
|top
|next