537 views
2 votes
2 votes
The problem of finding the set of vertices reachable from a given vertex in a graph can be solved in time

A. O(|V|^2)

B. O(|V| + |E|)

C. O(|V||E|)

D. none of these

1 Answer

0 votes
0 votes
B) O (V+E)

Perform BFS

Related questions

0 votes
0 votes
0 answers
1
1 votes
1 votes
1 answer
2
Shreya Roy asked Feb 28, 2017
298 views
If a graph has k-independent components, it it n-k+1 colorable
3 votes
3 votes
2 answers
3
dd asked Dec 6, 2016
2,604 views
Let P be a shortest path from some vertex s to some other vertex t in a directed graph. If the weight of each edge in the graph is increased by one, P will still be a sho...