Question DSA-GRDY-0049
MediumHow does Prim's algorithm grow the minimum spanning tree?
- A.
By adding the cheapest edge anywhere
- B.
By running BFS
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Greedy question
How does Prim's algorithm grow the minimum spanning tree?
By adding the cheapest edge anywhere
By running BFS
Sign up free to see the answer and a step-by-step explanation.
From one vertex, always adding the cheapest edge leaving the tree
By removing the most expensive edges