• edited by
2,306 views
1 1 vote

Given two vertices in a graph $s$ and $t$. Which of the two traversals (BFS and DFS) can be used to find if there is path from $s$ to $t$ ?

  1. Only BFS
  2. Only DFS
  3. Both BFS and DFS
  4. Neither BFS nor DFS

1 Answer

Position:
Show:

Related questions

1 1 vote
1 1 answer
1.8k
1.8k views
komal07 asked May 14, 2015
1,778 views
116. Consider the following statements :1. Breadth-first search are performed by exploring all nodes at a given depth before proceeding to the next level.1I. An algorithm...
1 1 vote
1 1 answer
672
672 views
thor asked Jan 15, 2017
672 views
Consider the following statements:A. In a weighted undirected graph $\mathrm{G}=(\mathrm{V}, \mathrm{E}, \mathrm{w})$, breadth-first search from a vertex s finds single-s...
1 1 vote
0 0 answers
1.9k
1.9k views
Markzuck asked Dec 30, 2018
1,860 views
Can someone please explain what are the types of edges possible in BFS and DFS for DIRECTED as well as UNDIRECTED graphs?Individual meaning of BACK, FRONT and CROSS edges...
0 0 votes
1 1 answer
1.1k
1.1k views
iarnav asked Dec 9, 2017
1,059 views
Can BFS and DFS both work cyclic and acyclic graphs?! Kindly explain for each of 'em. Thank you!