Skip to content

ISRO Scientist/Engineer CSE 2018Algorithms › Design Techniques and Graph Algorithms

ISRO Scientist/Engineer CSE 2018 PYQ: Which of the following is application of Breath First Search on the graph?

Which of the following is application of Breath First Search on the graph?

  1. A
    Finding diameter of the graph
  2. B
    Finding bipartite graph
  3. C
    Both (a) and (b)
    Correct answer
  4. D
    None of the above

Answer

(C) Both (a) and (b)

Approach

Recall the standard applications of Breadth First Search (BFS). BFS explores a graph level by level, which makes it suitable both for computing eccentricities (and hence the diameter) and for 2-coloring to test bipartiteness.

Reviewed by ISRO IQ Editorial Team.