title: DFS and a stack
body: <p>I am learning CS algorithms in my spare time and have been getting on quite well but I'm having trouble understanding adjacency matrix and DFS.</p>
  
  <pre><code>010100
  101100
  010110
  111000
  001001
  000010
  </code></pre>
  
  <p>If the above is a undirected graph, with 6 vertices (a, f) (1st row is vertex a etc.) If the graph is traverse using DFS and a stack, starting at vertex a.</p>
  
  <p>What would the contents of the queue after every time vertices are inserted to or removed from it be? I'm assuming that if there are 2 inserted at the same time it will be in alphabetical order.</p>
  
  <p>Can someone explain how to work this out?</p>