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

PYQ GATE 2017

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 711 students.

Sign up free to check your answer

Sign up free

Explore the full course: Data Structures

Loading lesson…