Open In App
Related Articles

Algorithms | Graph Traversals | Question 12

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

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
Previous
Next
Share your thoughts in the comments
Similar Reads