title: Find node with the highest density in graph
body: <p>In my program, Density represents the count that indicates number of nodes connected to particular node. For example, if some node has density of 3, that indicates it is connected to 3 other nodes in the undirected graph. I want to decide the node that has highest density. Till now I am doing something like this:</p>
  
  <pre><code>    public Node LeaderIs(List&lt;Node&gt; list)
      {
          for (int k = 0; k &lt; list.Count; k++)
          {
              var i = YelloWPages.GetNode(k, list);
              for (int l = 0; l &lt; list.Count; l++)
              {
                  var j = YelloWPages.GetNode(l, list);
                  if (Node.GetDensity(i) &gt; Node.GetDensity(j))
                  {
                      Node Leadernode = i;
                  }
              }
          }
      }
  </code></pre>
  
  <p>I have two questions:</p>
  
  <ol>
  <li>If this is correct? And if yes, from where should I return the Leadernode?</li>
  <li>If it is not correct, where I have went wrong and what implementation can be done to get <code>Leadernode</code> ?</li>
  </ol>