Skip to content

Commit 3d1221f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent bab3b96 commit 3d1221f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

greedy_methods/Prim's_algorithm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from typing import Dict, Any
22
import heapq
33

4+
45
def prim_mst(graph: Dict[Any, Dict[Any, int]]) -> Dict[Any, Any]:
56
"""
67
Generate the Minimum Spanning Tree (MST) using Prim's algorithm.
@@ -41,6 +42,8 @@ def prim_mst(graph: Dict[Any, Dict[Any, int]]) -> Dict[Any, Any]:
4142

4243
return mst
4344

45+
4446
if __name__ == "__main__":
4547
import doctest
48+
4649
doctest.testmod()

0 commit comments

Comments
 (0)