Question DSA-QUE-0004
EasyWhich graph traversal uses a queue?
- A.
Backtracking
- B.
Depth-first search
- C.
Show answer and explanation
Answer: D
BFS visits nodes level by level, in the order they were discovered.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Queues and Deques question
Which graph traversal uses a queue?
Backtracking
Depth-first search
Answer: D
BFS visits nodes level by level, in the order they were discovered.
Inorder traversal
Breadth-first search