2D vector vs 1D vector
<p>In C++11, how does a 2D vector against 1D vector in terms of time?<br>
In the 2D vector given, all the inner vectors are of the same size.</p>

<p>Ex:</p>

<pre><code>std::vector&lt;std::vector&lt;int&gt;&gt; X{10, std::vector&lt;int&gt;(4)};
</code></pre>

<p>vs     </p>

<pre><code>std::vector&lt;int&gt; Y(40);
</code></pre>

<p>Which avatar of the vector would perform better when the elements are randomly accessed?</p>