Computer science: depth-first search

Self-tutoring about computer science: the tutor mentions depth-first search (DFS).

In yesterday’s post I mention breadth-first search. Now, to compare, I continue with depth-first.

With depth-first search, if you have three rooms to search, you’ll search everywhere in the first room before moving to the next one. In a folder system, depth-first search will search a folder, then a subfolder of it, then a subfolder of that one, and so on, before it enters an adjacent folder of the first one it entered.

Source:

Goodrich, Michael T. and Roberto Tamassia. Algorithm Design. Hoboken: John Wiley & Sons, 2002.

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Leave a Reply