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.
010100
101100
010110
111000
001001
000010
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.
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.
Can someone explain how to work this out?
