Question discussion

[Added later – this question is not part of the original paper]Which data structure is used to implement Breadth-First Search (BFS) of a gr…

358857Medium DSSSB TGT Computer Science 0 replies 0 views
0

[Added later – this question is not part of the original paper]

Which data structure is used to implement Breadth-First Search (BFS) of a graph?

  • AStack
  • BQueue
  • CHeap
  • DTree
Correct answer: B

Explanation

BFS visits nodes level by level, so it uses a queue (FIFO).

Discussion 0

Nobody has replied yet. Start the discussion!