Home »
MCQs »
Data Structure and Algorithms (DSA) MCQs
How to find if two vertices A and B of a graph have a path in between them?
8. How to find if two vertices A and B of a graph have a path in between them?
- Using Breadth First Search, BFS
- Using Depth First Search, DFS
- Both of the above
- None of the above
Answer
The correct answer is: C) Both of the above
Explanation
Both BFS and DFS, we can find if two vertices A and B have a path in between them.