in Algorithms retagged by
824 views
1 vote
1 vote

What will be the path from A-H if BFS is used in the following graph?
 

bfs-graph

in Algorithms retagged by
824 views

2 Answers

1 vote
1 vote
path - (ABDFH) OR (ACDFH)

visiting order - (A-B-C-D-F-E-H) or (A-C-B-D-F-E-H)
0 votes
0 votes

4 possible answer as per my understanding : 

  1. ABCDFEGH
  2. ABCDEFGH
  3. ACBDEFGH
  4. ACBDFEGH