Prim's Algorithm - Time Complexity
www.liquisearch.com › prims_algorithm › time_complexityTime Complexity. A simple implementation using an adjacency matrix graph representation and searching an array of weights to find the minimum weight edge to add requires O ( V 2) running time. Using a simple binary heap data structure and an adjacency list representation, Prim's algorithm can be shown to run in time O ( E log V) where E is the number of edges and V is the number of vertices.