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?
- AFinding diameter of the graph
- BFinding bipartite graph
- CBoth (a) and (b)Correct answer
- DNone 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.