I'm trying to understand the difference between DFS Recursive and DFS iterative. Does the one with the stack use an iterative or recursive approach?
For example, what would be the output of using a DFS recursive traversal of the graph and a DFS iterative traversal of the graph? The neighbors are iterated through in alphabetical order.
Heres the graph:
For a DFS traversal (the one with a stack, not sure if its recursive or iterative) this is what I got: A, C, D, E, F. Can someone confirm what type of DFS traversal this is, and how the other one would work? Thanks!