In Prim's algorithm, it will be reduced to _________ if heap is used to keep.
-
O(|E|log|V|)
-
O(VlogE)
-
O(EV)
-
O(log V)
A
Correct answer
Explanation
Prim's algorithm using a binary heap performs O(|E|) extract-min and O(|V|) decrease-key operations, each costing O(log|V|). The dominant term is |E|log|V| because the number of edges is typically greater than vertices. Option B incorrectly writes V as base and E as exponent, while C and D are not the correct complexity for heap-based Prim's.