adplus-dvertising
frame-decoration

Question

An undirected graph G with n vertices and e edges is represented by adjacency list. What is the time required to generate all the connected components?

a.

O (n)

b.

O (e)

c.

O (e+n)

d.

O (e-n)

Answer: (c).O (e+n)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. An undirected graph G with n vertices and e edges is represented by adjacency list. What is the time required to generate all the connected components?

Similar Questions

Discover Related MCQs

Q. A graph with n vertices will definitely have a parallel edge or self loop if the total number of edges are

Q. The maximum degree of any vertex in a simple graph with n vertices is

Q. The data structure required for Breadth First Traversal on a graph is

Q. In Breadth First Search of Graph, which of the following data structure is used?

Q. For an undirected graph G with n vertices and e edges, the sum of the degrees of each vertex is

Q. A complete graph can have ...............

Q. Graph traversal is different from a tree traversal, because:

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.