Depending on a representation of a graph and a data structure used to find an edge with the smallest weight, Prim's algorithm may have different running time. Match the boxes with representations of a graph and data structures (on the left) with the corresponding running time (on the right). is the number of the vertices of the graph, – the number of the edges.
Computer scienceAlgorithms and Data StructuresAlgorithmsGraph algorithmsMinimum spanning tree algorithms
Prim's algorithm
The running time
Report a typo
Match the items from left and right columns
An adjacency list, an additional binary heap
An adjacency matrix, no additional data structure
An adjacency matrix, an additional list or array
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.