Middle
What is the complexity of removing an element from a vector in C++?
sobes.tech AI
Answer from AI
O(N) in the worst case, because after removal, all subsequent elements may need to be shifted. If the last element is removed, the complexity is O(1).