Pergunta da entrevista

Entrevista para Senior Software Engineer

-Belo Horizonte, Minas Gerais, Minas Gerais

Google

Given a maze, represented as a matrix, and the initial and final points write an algorithm to solve this.

Resposta

Respostas da entrevista

3 respostas

0

I tried to solve it using a breadth first search but I couldn't finish write the algorithm, I wasn't very trained at that occasion.

Confidencial em

0

Maybe you could use Dijkstra's shortest path algorithm.

Glaucio em

0

Both BFS and Dijkstra should work in this case because the edges doesn't have a weight.

Leonardo em

Adicionar respostas ou comentários

Para comentar sobre isso, entre na conta ou cadastre-se.