title: Performing DFS and BFS on a directed graph
body: <p>Suppose we have a graph such as:</p>
  
  <p><img src="https://i.stack.imgur.com/1j5IO.jpg" alt="graph"></p>
  
  <p>If you wanted a path from 0 to 5, in what order will we visit the nodes if we perform DFS and BFS on this graph (assume the lowest element is always pushed first).  I'm having trouble conceptualizing how the algorithms will work for a graph with cycles, and I was hoping someone could outline the procedure each takes on such a graph.</p>