Depth-first search


How does it work?


RULE

Select alphabetically first child node of current branch tip, if you have reached the end of the branch, backtrack until you find other options.


EXPLANATION

branch tip
this is the starting node, but if you successfully select a node it becomes the new branch tip

backtrack
return to previously visited nodes in current branch and check if it has unselected children


Still confused?

Read more about it and then return here to try out what you learned.

Start node End node