Graph Algorithms


Answer & solution
Answer: D is the usual informative bound; B, D, E are valid upper bounds for connected simple graphs (no official key was published)
Comparison-sort Kruskal first sorts m edges in O(m log m), then processes them with disjoint-set operations. For a connected simple graph, n−1≤m≤n(n−1)/2, so log m=O(log n), yielding O(m log n). This supports D. Because big-O is an upper bound, the same algorithm is also O(mn) and O(m²), so B and E cannot be called false merely for being looser in a multiple-answer task. O(m+n) is not the generic comparison-sorting bound; O(n²) does not cover the usual sorting cost for dense arbitrary-weight inputs. Different integer-sorting or presorted-edge models can change the analysis.