I'm trying to calculate complexity of some algorithms but I don't no how to mesure the complexity of the operations with vectors. For example, what is the complexity of push_back()?
In c++ reference I found "Constant (amortized time, reallocation may happen). If a reallocation happens, the reallocation is itself up to linear in the entire size."
What does it's means? Is the operation of complexity O(n)? (n is the vector length).
Thank you.