Depth-First Search:Iterative Formulation
1. Put the start state on a list OPEN
2. If OPEN is empty, output “DONE” and stop.
3. Select the first state on OPEN and call it S.
If S is a goal state, output its description
4. Generate the list L of successors of S and delete
from L those states already appearing on CLOSED.
5. Delete any members of OPEN that occur on L.
Insert all members of L at the front of OPEN.