[prev] 20 [next]

Exercise #4: Depth-first Traversal (iii)

Show how the stack evolves when executing findPathDFS(g,0,5) on:

[Diagram:Pic/traversal0.png]

Push neighbours in descending order … so they get popped in ascending order