title: Space complexity of pushing n elements onto a vector
body: <p>Say I have an input size of n, and these n elements are pushed onto a vector. </p>
  
  <p>I recently starting learning about space complexity, but I'm a bit confused. So it looks at memory usage, but this is dynamically allocated memory?</p>
  
  <pre><code>vector&lt;int&gt; v; 
  </code></pre>
  
  <p>Although this doesn't use the "new" keyword, I read a vector is actually dynamically allocated when you push, so would this mean the space complexity would simply be O(n)? </p>