Questão 3

 




Given the undirected graph bellow:

What is the distance from A to all nodes in this graph if we use a BFS algorithm starting from A?

a) A - 0, B - 1, C - 2, D - 1, E - 2, F - 3, H - 4, G - 0

b) A - 0, B - 1, C - 2, D - 1, E - 2, F - 2, H - 3, G - 4

c) A - 0, B - 1, C - 2, D - 1, E - 2, F - 2, H - 3, G - Null

d) A - 0, B - 1, C - 2, D - 1, E - 2, F - 2, H - 3, G - Null

e) None of the above







Comentários

  1. Dear João Augusto, nice question. It is a bit on the easy side, but I noticed we don't have yet a question on BFS where distances are computed, so I decided to take this question of yours.

    ResponderExcluir

Postar um comentário

Postagens mais visitadas deste blog

Questão - Semana 1

Questão 2

Questão 4 - Calculus