enow.com Web Search

Search results

  1. Results from the WOW.Com Content Network
  2. Depth-first search - Wikipedia

    en.wikipedia.org/wiki/Depth-first_search

    Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking.

  3. Graph traversal - Wikipedia

    en.wikipedia.org/wiki/Graph_traversal

    A depth-first search (DFS) is an algorithm for traversing a finite graph. DFS visits the child vertices before visiting the sibling vertices; that is, it traverses the depth of any particular path before exploring its breadth. A stack (often the program's call stack via recursion) is generally used when implementing the algorithm.

  4. Tree traversal - Wikipedia

    en.wikipedia.org/wiki/Tree_traversal

    For example, given a binary tree of infinite depth, a depth-first search will go down one side (by convention the left side) of the tree, never visiting the rest, and indeed an in-order or post-order traversal will never visit any nodes, as it has not reached a leaf (and in fact never will). By contrast, a breadth-first (level-order) traversal ...

  5. Iterative deepening depth-first search - Wikipedia

    en.wikipedia.org/wiki/Iterative_deepening_depth...

    Iterative deepening depth-first search; Class: Search algorithm: Data structure: Tree, Graph: Worst-case performance (), where is the branching factor and is the depth of the shallowest solution: Worst-case space complexity [1] Optimal: yes (for unweighted graphs)

  6. A* search algorithm - Wikipedia

    en.wikipedia.org/wiki/A*_search_algorithm

    Dijkstra's algorithm, as another example of a uniform-cost search algorithm, can be viewed as a special case of A* where ⁠ = ⁠ for all x. [12] [13] General depth-first search can be implemented using A* by considering that there is a global counter C initialized with a very large value.

  7. Tarjan's strongly connected components algorithm - Wikipedia

    en.wikipedia.org/wiki/Tarjan's_strongly_connected...

    The basic idea of the algorithm is this: a depth-first search (DFS) begins from an arbitrary start node (and subsequent depth-first searches are conducted on any nodes that have not yet been found). As usual with depth-first search, the search visits every node of the graph exactly once, refusing to revisit any node that has already been visited.

  8. Topological sorting - Wikipedia

    en.wikipedia.org/wiki/Topological_sorting

    An alternative algorithm for topological sorting is based on depth-first search.The algorithm loops through each node of the graph, in an arbitrary order, initiating a depth-first search that terminates when it hits any node that has already been visited since the beginning of the topological sort or the node has no outgoing edges (i.e., a leaf node):

  9. Maze generation algorithm - Wikipedia

    en.wikipedia.org/wiki/Maze_generation_algorithm

    Randomized depth-first search on a hexagonal grid. The depth-first search algorithm of maze generation is frequently implemented using backtracking. This can be described with a following recursive routine: Given a current cell as a parameter; Mark the current cell as visited; While the current cell has any unvisited neighbour cells