...
Question 7975 – GATE 2017 [Set-2]
November 16, 2023
Question 7978 – GATE 2017 [Set-2]
November 16, 2023
Question 7975 – GATE 2017 [Set-2]
November 16, 2023
Question 7978 – GATE 2017 [Set-2]
November 16, 2023

Question 7977 – GATE 2017 [Set-2]

The Breadth First Search (BFS) algorithm has been implemented using the queue data structure. Which one of the following is a possible order of visiting the nodes in the graph below?

Correct Answer: D

Question 15 Explanation: 
The possible order of visiting the nodes in Breadth First Search Algorithm, implementing using Queue Data Structure is

(Do it by option Elimination)
(a) MNOPQR – MNO is not the proper order R must come in between.
(b) NQMPOR – QMP is not the order O is the child of N.
(C) QMNROP – M is not the child of Q, so QMN is false.
(D) POQNMR – P → OQ → NMR is the correct sequence. Hence Option (D).
A
MNOPQR
B
NQMPOR
C
QMNROP
D
POQNMR
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!