Skip to content

Commit ea971d7

Browse files
Add typing
1 parent 81661bd commit ea971d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: sorts/topological_sort.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
vertices = ["a", "b", "c", "d", "e"]
1010

1111

12-
def topological_sort(start, visited, sort):
12+
def topological_sort(start: str, visited: list[str], sort: list[str]) -> list[str]:
1313
"""Perform topological sort on a directed acyclic graph."""
1414
current = start
1515
# add current to visited

0 commit comments

Comments
 (0)