title: kruskal implement in c adjacency list or adjacency matrix
body: <p>I am reading the textbook <code>Introduction to Algorithms</code> aka <code>CLRS</code>, I want to implement the <code>mst</code> using <code>kruskal</code> algorithm in c, what I want to know is, which graph implementation should I use, the adjacency list or adjacency matrix? I think it is not intuitive to sort the <code>edges</code> when using the adjacency list, the represent of <code>edge</code> in adjacency list is confusing when define the adjacency list like this:</p>
  
  <pre><code>typedef struct tagAdjList
  {
      int endPointIndex;
      struct tagAdjList * next;
  }AdjNode, *AdjList, *AdjPNode;
  </code></pre>
  
  <p>when sorting the edges, I want to using an array of pointers to pointing to the nodes defined above, the question is the struct defined above can't find the <code>start point</code> of the edge but the <code>end point</code>. So I changed the struct like this:</p>
  
  <pre><code>typedef struct tagAdjList
  {
      int startPointIndex;
      int endPointIndex;
      struct tagAdjList * next;
  }AdjNode, *AdjList, *AdjPNode;
  </code></pre>
  
  <p>what I want to ask is: is OK to define the adjancency list like this? or there are better practice? or I just should use the adjacency matrix(since I saw some people implement the kruskal using the matrix when searching the Internet)?  why?
  Sorry for the poor English. any help will be appreciated.</p>