Reserve the space for vector have a lot of benefits show below. Zero cost: only reserved memory, does not affect logic Significantly improve performance: avoid multiple memory allocations and copies ...