The Breadth First Search (BFS) algorithm has been implemented using the queue…

GATE · 2017 · CS · Set 2 · Computer Science & IT

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?

  1. A.

    MNOPQR\text{MNOPQR}

  2. B.

    NQMPOR\text{NQMPOR}

  3. C.

    QMNROP\text{QMNROP}

  4. D.

    POQNMR\text{POQNMR}

Attempted by 621 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…