Last Updated : 19 Nov, 2018

Consider the following graph:
\"\"
Which of the following traversal is not breadth first traversal of given graph with starting node A?
(A) AFCEDIHBG
(B) ACFGBIHDE
(C) ACGBIHDEF
(D) ACFBIHDEG


Answer: (C)

Explanation: Breadth First Search works on the queue principal i.e. FIFO whichever node traversed first, it will follow level order traversal.
AFCEDIHBG, ACFGBIHDE, ACFBIHDEG are correct breadth-first traversal. ACGBIHDEF is incorrect BFT for given tree.
So, option (C) is correct.


Quiz of this Question


Share your thoughts in the comments