Why is the BigO of adjacency list for a graph is (V + E) and not (V^2)?
<p>Correct me if my thinking is wrong. I think that BigO(V + E) = BigO(V^2).  </p>

<p>Below is my thinking:<br>
Edges in a complete graph = n*(n-1)/2.</p>

<p>Switching from E and V to n because it is easier for me to think that way.</p>

<p>E =   n*(n-1)/2<br>
V =   n </p>

<p>BigO(V + E) => BigO(n + n*(n-1)/2) => BigO(n^2) </p>

<p>Switching n back to V.</p>

<p>=> BigO(v^2)</p>

<p>am I missing something? Why use BigO(V + E)? Why not use BigO(V^2)?</p>