adplus-dvertising
frame-decoration

Question

Graph traversal is different from a tree traversal, because:

a.

trees are not connected

b.

graphs may have loops

c.

trees have root

d.

None of these

Answer: (c).trees have root

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Graph traversal is different from a tree traversal, because:
pankaj : June 26, 2023

unlike trees, graphs may contain cycles, so we may come to the same node again. To avoid processing a node more than once, we divide the vertices into two categories:
Visited and
Not visited.

Similar Questions

Discover Related MCQs

Q. The number of edges in a simple, n-vertex, complete graph is

Q. Graphs are represented using ............

Q. The spanning tree of connected graph with 10 vertices contains ..............

Q. If locality is a concern, you can use ................ to traverse the graph.

Q. Which of the following algorithms solves the all-pair shortest path problem?

Q. The minimum number of colors needed to color a graph having n (>3) vertices and 2 edges is

Q. Which of the following is useful in traversing a given graph by breadth first search?

Q. The minimum number of edges in a connected cyclic graph on n vertices is

Q. The number of edges in a regular graph of degree d and n vertices is

Q. In the given graph identify the cut vertices.

Q. For the given graph(G), which of the following statements is true?

Q. The given Graph is regular.

Q. In the following DAG find out the number of required Stacks in order to represent it in a Graph Structured Stack.

Q. Which of the following graphs are isomorphic to each other?

Q. In the given graph which edge should be removed to make it a Bipartite Graph?

Q. What would be the DFS traversal of the given Graph?

Q. What is the number of words that can be formed from the given Directed Acyclic Word Graph?

Q. Determine the longest string which is described by the given Directed Acyclic Word Graph.

Q. Which of the following statements for a simple graph is correct?

Q. What is the number of edges present in a complete graph having n vertices?