Skip to content

Commit ba3da40

Browse files
committed
Update alien-dictionary.py
1 parent 1701e46 commit ba3da40

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Python/alien-dictionary.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def alienOrder(self, words):
77
:type words: List[str]
88
:rtype: str
99
"""
10-
# Find ancestors of each node by DFS
10+
# Find ancestors of each node by DFS.
1111
nodes, ancestors = sets.Set(), {}
1212
for i in xrange(len(words)):
1313
for c in words[i]:
@@ -17,7 +17,7 @@ def alienOrder(self, words):
1717
for i in xrange(1, len(words)):
1818
self.findEdges(words[i - 1], words[i], ancestors)
1919

20-
# Output topological order by DFS
20+
# Output topological order by DFS.
2121
result = []
2222
visited = {}
2323
for node in nodes:

0 commit comments

Comments
 (0)