Question: is dfs a greedy algorithm?
Answer: Most algorithms consist of an Initialisation phase in which variables are set up, and a Recursive or Iterative stage which recurses through the graph, usually either as a BFS or a DFS. Another idea in algorithms is that of a Greedy Algorithm. ... In this example of DFS, each vertex v is assigned and index D(v).