Which statement is correct? Kruskal's algorithm
-
A
Finds a minimum spanning tree by adding the smallest edges without forming cycles
Correct answer
-
B
Uses a stack or recursion to explore a graph
-
C
Finds the shortest paths from a source in a graph with non-negative weights
-
D
Has an average time complexity of O(n log n) and a worst case of O(n²)
Correct answer
A. Finds a minimum spanning tree by adding the smallest edges without forming cycles
Explanation
Kruskal's algorithm finds a minimum spanning tree by adding the smallest edges without forming cycles.
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ