Skip to content

Commit 239b8c8

Browse files
Ved Prakash VishwakarmaVed Prakash Vishwakarma
Ved Prakash Vishwakarma
authored and
Ved Prakash Vishwakarma
committed
Issue 12192 fixed with all checks passed
1 parent e08aadd commit 239b8c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sorts/topological_sort.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def topological_sort(start: str, visited: list[str], sort: list[str]) -> list[st
2121
# add current to visited
2222
visited.append(current)
2323
neighbors = edges[current]
24-
#as we are traversing in from top to down in tree like graph (direction not given) we consider direction from top to down
25-
#as the current node encounter add it to the topo sort list
24+
# direction not given so consider from top to bottom
25+
# as the current node encounter add it to the topo sort list
2626
sort.append(current)
2727
for neighbor in neighbors:
2828
# if neighbor not in visited, visit

0 commit comments

Comments
 (0)