Press "Enter" to skip to content

Posts tagged as “O(ElogV)”

花花酱 Minimum Spanning Tree (MST) 最小生成树 SP18

Prim’s Algorithm

Time complexity: O(ElogV)
Space complexity: O(V+E)

C++

Python

Kruskal’s Algorithm

Time complexity: O(ElogV)
Space complexity: O(V+E)

C++

Python