Consider the graph shown below.
/1725275013-198-7.png)
Which of the following edges form the MST of the given graph using Prim'a algorithm, starting from vertex 4.
A. (4-3)(5-3)(2-3)(1-2)
B. (4-3)(3-5)(5-1)(1-2)
C. (4-3)(3-5)(5-2)(1-5)
D. (4-3)(3-2)(2-1)(1-5)
Answer: Option D
Related Questions on Graph Algorithms (DFS, BFS, Dijkstras, etc)
A. Breadth-First Search (BFS)
B. Depth-First Search (DFS)
C. Bellman-Ford Algorithm
D. Dijkstra's Algorithm
What is the time complexity of Breadth-First Search (BFS) on a graph with V vertices and E edges?
A. O(V + E)
B. O(V2)
C. O(E log V)
D. O(V log V)
In Depth-First Search (DFS), what is the order of visiting nodes?
A. Level order
B. Inorder
C. Postorder
D. Preorder
Which algorithm can be used to detect negative weight cycles in a graph?
A. Dijkstra's Algorithm
B. Prim's Algorithm
C. Bellman-Ford Algorithm
D. Kruskal's Algorithm
Join The Discussion