🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.A stack
  2. B.A queue
  3. C.A priority queue always
  4. 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 →