Prim's algorithm grows the MST by
Asorting all edges and skipping those that close cycles
Bstart at a source, add the lightest edge out of the tree each step
Crunning breadth-first search from every vertex
Drunning Dijkstra and taking the path edges
Answer & Solution
Correct answer: B. start at a source, add the lightest edge out of the tree each step
Prim starts at one vertex and grows a single tree, always picking the lightest edge that crosses from inside to outside. Repeats |V| − 1 times. Sorting all edges first is Kruskal's strategy. BFS doesn't pick edges by weight. Dijkstra finds shortest paths (sum-of-edges), not MST.
Related questions
An NP-hard problem differs from an NP-complete one because NP-hard problemsThe first problem proved to be NP-complete wasA problem X is NP-complete if and only ifWhy does theoretical computer science draw the line at 'polynomial-time' for tractability?Which set inclusion is established (i.e., proven, not open)?The class NP is the set of decision problems for whichFloyd-Warshall detects the presence of a negative cycle byTopological sort is well-defined for