Doubling the capacity of vector

in what terms is the doubling of capacity of vector an expensive operation? Is time complexity the problem or something else?

@Arushi_Jain to doubling the size of vector includes allocating the space thats double the size of current space and the copying the current elements over there, since it has to copy all the current elements over to the new location it becomes expensive operation in terms of time.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.