Algorithms | Graph Traversals | Question 12
What are the appropriate data structures for following algorithms?
1) Breadth-First Search
2) Depth First Search
3) Prim\’s Minimum Spanning Tree
4) Kruskal\’ Minimum Spanning Tree
(A)
- Stack
- Queue
- Priority Queue
- Union Find
(B)
- Queue
- Stack
- Priority Queue
- Union Find
(C)
- Stack
- Queue
- Union Find
- Priority Queue
(D)
- Priority Queue
- Queue
- Stack
- Union Find
Answer: (B)
Explanation:
Hence Option(B) is the correct answer.
Quiz of this Question
Please comment below if you find anything wrong in the above post
Last Updated :
28 Jun, 2021
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...