Worst case is the worst case time complexity of Prim’s algorithm if adjacency matrix is used?
Worst case is the worst case time complexity of Prim’s algorithm if adjacency matrix is used? Correct Answer O(V2)
Use of adjacency matrix provides the simple implementation of the Prim’s algorithm. In Prim’s algorithm, we need to search for the edge with a minimum for that vertex. So, worst case time complexity will be O(V2), where V is the number of vertices.
মোঃ আরিফুল ইসলাম
Feb 20, 2025