Pergunta de entrevista da empresa iHerb

Print all nodes from a given node in a directed graph.

Resposta da entrevista

Sigiloso

2 de fev. de 2019

Depth first search, Breadth First Search, Best First Search, anything will work. Though write the simplest one in the language of your choice: RecursiveDFS(v): ....if v is unmarked ........mark v ........print v ........for each edge vw ............RecursiveDFS(w) It is one of those algorithm problems that I would definitely classify "Very Easy".