×

Multiple-Choice Questions

The complexity of Prim's algorithm when using an adjacency list and a binary heap is ____.

44. The complexity of Prim's algorithm when using an adjacency list and a binary heap is ____.

  1. O(V^2)
  2. O(E log V)
  3. O(E + V)
  4. O(V log E)

Answer

The correct answer is: B) O(E log V)

Explanation

When using an adjacency list with a binary heap, Prim's algorithm runs in O(E log V) time.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.