[prev] 77 [next]

Exercise #12: Depth-first Traversal (iii)

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

[Diagram:Pic/graph3.png]

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