Graph Traversals Quiz 1

Placewit
Jun 20, 2021

--

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 ?

A. Only BFS

B. Only DFS

C. Both BFS and DFS

D. Neither BFS nor DFS

Solution :

C) is correct.

We can use both traversals to find if there is a path from s to t.

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.

--

--

Placewit
Placewit

Written by Placewit

Upskilling students for tech placements!

No responses yet