title: Time/Space complexity of adjacency matrix and adjacency list
body: <p>I am reading "Algorithms Design" By Eva Tardos and in chapter 3 it is mentioned that adjacency matrix has the complexity of <code>O(n^2)</code> while adjacency list has <code>O(m+n)</code> where m is the total number of edges and n is the total number of nodes. It says that in-case of adjacency list we will need only lists of size m for each node.</p>
  
  <p>Won't we end up with something similar to matrix in case of adjacency list as we have lists,which are also 1D arrays. So basically it is <code>O(m*n)</code> according to me. Please guide me.</p>