title: Adjacency matrix for undirected graph
body: <p>An adjacency matrix works well for a directed graph but not as well for an undirected graph because there are duplications in the matrix.</p>
  
  <p>That is, during every insert to the graph, I have to update the matrix twice. Is there a way I can update the matrix only once? That is, is there a more efficient adjacency matrix for undirected graphs.</p>