title: Finding the correct path in O(n) time
body: <p>Consider there is a path from source to destination but is jumbled up.</p>
  
  <p>For example</p>
  
  <pre><code>A B      E F
  B C      A B
  C D  -&gt;  D E
  D E      C D
  E F      B C
  </code></pre>
  
  <p>Assuming there are no cycles, Given the Jumbled path can we get back the original path in O(n) time.</p>