Skip to content

Commit

Permalink
Update kruskalFunction.py
Browse files Browse the repository at this point in the history
Changed values to work for function
  • Loading branch information
aemms committed Apr 15, 2013
1 parent d0936bd commit 1812fd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kruskalFunction.py
Expand Up @@ -25,7 +25,7 @@ def Kruskal (N, A):
print u, v, ":",C
C = merge (C, ucomp, vcomp)
T.append((u,v))
if (len(self.T) == (self.n-1)): break
if (len(T) == (n-1)): break

print "\nMinimum spanning tree:\n", T
return T
Expand All @@ -41,4 +41,4 @@ def Kruskal (N, A):
("a5","a6",8), ("a5","a7",7),
("a6","a7",3)]

Kruskal(N, A)
Kruskal(N, A)

0 comments on commit 1812fd4

Please sign in to comment.