Question: does option e has V^3+n^2/2 complexity, which is greater than option c? Consider the components algorithm from the lectures that assigns vertices to connected components.
Consider the components algorithm from the lectures that assigns vertices to connected components. What is the worst case time complexity of the algorithm, assuming that the graph uses the adjacency matrix representation? Note: In the time complexities below, V and E refer to the number of vertices and edges in the graph respectively. (a) O(V) (b) O(N^2) (c) O( 3) (d) O(V+E) (e) ON(N + E)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
