A

Admin • 828.03K Points
Coach

Q. Worst case is the worst case time complexity of Prim’s algorithm if adjacency matrix is used?

  • (A) o(log v)
  • (B) o(v2)
  • (C) o(e2)
  • (D) o(v log e)

Explanation by: Admin
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.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.