I actually consult the graph search instructions each time I want a nonrecursive (with an explicit stack) DFS: