previous | start

Trace Example

G

 0: 1, 2, 5
 1: 0, 2
 2: 0, 1, 4
 3: 4, 5
 4: 2, 3
 5: 0, 3
   

Trace of dfs(G, 0)

vertex             marked array
                 0  1  2  3  4  5
  0              x
  |
  1                 x
  |
  2                    x
  |
  4                          x
  |
  3                       x
  |
  5                             x     
      
   


previous | start