Depth-first search (DFS) is an algorithm for traversing or searching a tree, tree structure, or graph. One starts at the root (selecting some node as the root in the graph case) and explores as far as possible along each branch before backtracking.
A version of depth-first search was investigated in the 19th century by French mathematician Charles Pierre Trémaux as a strategy for solving mazes.
Read more about Depth-first Search: Formal Definition, Properties, Example, Output of A Depth-first Search, Pseudocode, Applications
Famous quotes containing the word search:
“His life itself passes deeper in nature than the studies of the naturalist penetrate; himself a subject for the naturalist. The latter raises the moss and bark gently with his knife in search of insects; the former lays open logs to their core with his axe, and moss and bark fly far and wide. He gets his living by barking trees. Such a man has some right to fish, and I love to see nature carried out in him.”
—Henry David Thoreau (18171862)