Consider the following statements:
I. Given a tree T, it is possible to find the diameter of T using two BFS executions.
II. If an undirected graph is bipartite, it can be detected using BFS.
III. BFS was run on a connected simple graph, starting from a node r. Let u and v be two nodes in the graph. If the distance from r to u is 2, and the distance from r to v is 1, then the distance between u and v in the graph must necessarily be 1.
Which of the statements are correct?
a) Only I
b) Only II
c) I and II
d) II and III
e) None of the above
No comments:
Post a Comment