Sail E0 Webinar
Question
A person wants to visit some places. He starts from a vertex and then wants to visit every place connected to this vertex and so on. What algorithm he should use?
Options:
A .  Depth First Search
B .  Breadth First Search
C .  Trim's algorithm
D .  None of the mentioned
Answer: Option B


This is the definition of the Breadth First Search. Exploring a node, then it's neighbors and so on.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers