In the lecture it is mentioned that when push_back() is called, if the vector is full its size is doubled whereas
https://cplusplus.com/reference/vector/vector/push_back/
says “This effectively increases the container size by one”.
Please look into the issue.