← Quiz: Queues and Deques: all 13 questions
Quiz: Queues and Deques · Question 7 of 13
Which data structure does breadth-first search use?
Which data structure does breadth-first search use?
- A.A stack
- B.A queue
- C.A priority queue always
- D.A hash map only
Answer & explanation
Correct answer: A queue
BFS processes nodes in the order they were discovered: first in, first out.
Can you get the rest right without peeking?
Take the timed Quiz: Queues and Deques quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →