Cognizant interview question

vector internal memory allocation during element addition and removal