Pergunta de entrevista da empresa LiveRamp

How do I find if a path exists between a start and end node in a large unweighted and undirected graph?

Resposta da entrevista

Sigiloso

18 de out. de 2016

We can use BFS to check if a path exists between two given node. Start from the source node and mark all neighbors and perform BFS until you reach end node. If end node is found then path exists else does not. Was you asked to write the code for it?

1