Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3dfac51

Browse files
Update vertex.py
1 parent 526a0be commit 3dfac51

File tree

1 file changed

+6
-4
lines changed
  • graphs/minimum-spanning-tree/prims-algorithm

1 file changed

+6
-4
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
class Vertex:
2-
def __init__(self, label: str = None, weight: int = float("inf"), key: int = None):
3-
self.label: str = label
4-
self.weight: int = weight
5-
self.key: int = key
2+
3+
def __init__(self, label:str=None, weight:int=float('inf'), index:int=None) -> None:
4+
self.label:str = label
5+
self.weight:int = weight
6+
self.index:int = index
7+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /