The Breadth First Search (BFS) algorithm has been implemented using the queue data structure. Consider the undirected graph with vertices M, N, O, P, Q, R and the 7 edges M-N, M-Q, M-R, N-O, N-Q, O-P, P-Q.Which one of the following is a possible order of visiting the nodes in the graph?
- AMNOPQR
- BNQMPOR
- CQMNROP
- DPOQNMR