Skip to content

Commit e9c728f

Browse files
authored
Update lexicographically-smallest-equivalent-string.py
1 parent ef46b1a commit e9c728f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/lexicographically-smallest-equivalent-string.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def smallestEquivalentString(self, A, B, S):
2828
"""
2929
union_find = UnionFind(26)
3030
for i in xrange(len(A)):
31-
union_find.union_set(ord(A[i])-ord('a'), ord(B[i])-ord('a'));
31+
union_find.union_set(ord(A[i])-ord('a'), ord(B[i])-ord('a'))
3232
result = []
3333
for i in xrange(len(S)):
34-
parent = union_find.find_set(ord(S[i])-ord('a'));
34+
parent = union_find.find_set(ord(S[i])-ord('a'))
3535
result.append(chr(parent+ord('a')))
3636
return "".join(result)

0 commit comments

Comments
 (0)