Consider the following statements.
S1. Kruskal's algorithm might produce a non-minimal spanning tree.
S2. Kruskal's algorithm can efficiently implemented using the disjoint-set data structure.
A. S1 is true but S2 is false
B. Both S1 and S2 are false
C. Both S1 and S2 are true
D. S2 is true but S1 is false
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