Worst case is the worst case time complexity of Prim’s algorithm if adjacency matrix is used?
|D.||o(v log e)|
|Answer» B. o(v2)|
|Explanation: 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.|
Login to Continue
It will take less than 2 minutes