in DS edited by
692 views
1 vote
1 vote

Which of the following is useful in traversing a given graph by breadth first search?

  1. Stack
  2. Set
  3. List
  4. Queue
in DS edited by
by
692 views

2 Answers

3 votes
3 votes
option D is correct.

Queue is used in Breadth First Search

Stack is used in Depth First Search.
1 vote
1 vote
Answer is D
QUEUE is for BFS
STACK is for DFS
Answer:

Related questions