title: The longest cycle in an undirected graph
body: <p>How i can get the longest cycle in a undirected Graph (without BackTracking, it takes too long).</p>
  
  <p>Example:</p>
  
  <pre><code>0 3 0 1 0
  3 0 0 1 0
  0 0 0 0 0
  1 1 0 0 0
  0 0 0 0 0
  </code></pre>
  
  <p>Solve: 3 + 3 + 1 => Out: 1 - 2 - 3 - 1.</p>