title: How can I search a graph for a path?
body: <p>Say I have a list of edges each containing two nodes (to and from). What is the best way to find the edge two given nodes? Note that nodes in the edge may repeat.</p>
  <p>Say I have edge in this format:</p>
  <blockquote>
  <p>1 &lt;-&gt; 5</p>
  <p>3 &lt;-&gt; 7</p>
  <p>5 &lt;-&gt; 6</p>
  <p>2&lt;-&gt; 6</p>
  </blockquote>
  <p>Then query such as 1  5 will return <strong>true</strong>.</p>
  <p>Then query such as 5  2 will return <strong>true</strong> because 5 connects 6 and 6 connects to 2.</p>
  <p>Then query such as 1  7 will return <strong>false</strong>.</p>
  <p>Then query such as 7 4  will return <strong>false</strong> since 4 doesnt exist, it means it is edge-less node.</p>