Which of the following lists of data structures best fits the list of graph algo
ID: 3799359 • Letter: W
Question
Which of the following lists of data structures best fits the list of graph algorithms?
1) Depth First Search(DFS)
2) Breadth First Search(BFS)
3) Prim's Minimum Spanning Tree
4) Kruskal' Minimum Spanning Tree
Choose Only One Set of the following!
1) Queue
2) Stack
3) Priority Queue
4) Union Find
1) Stack
2) Queue
3) Priority Queue
4) Union Find
1) Queue
2) Stack
3) Union Find
4) Priority Queue
1) Priority Queue
2) Queue
3) Stack
4) Union Find
1) Queue
2) Stack
3) Priority Queue
4) Union Find
1) Stack
2) Queue
3) Priority Queue
4) Union Find
1) Queue
2) Stack
3) Union Find
4) Priority Queue
1) Priority Queue
2) Queue
3) Stack
4) Union Find
Explanation / Answer
1) Depth First Search(DFS)
=> Queue, because it follows first in first out
2) Breadth First Search(BFS)
=> Stack, because it follows last in first out
3) Prim's Minimum Spanning Tree
=> uses Priority Queue
4) Kruskal' Minimum Spanning Tree
=> uses Union Find to detect cycle in graph
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.