Which data structure is commonly used for BFS?
Practice this question from Quiz: Trees, Stacks, and Queues, with options and an explanation.
Question
Which data structure is commonly used for BFS?
Option A — Correct answer
Queue
BFS processes nodes level by level using FIFO order.
Option B
Stack only
Option C
StringBuilder
Option D
Optional