Skip to content

Commit 7bd7a06

Browse files
author
I529010
committed
fix line_to_long issue
1 parent 4e10940 commit 7bd7a06

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

matrix/transitive_closure.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ def transitive_closure(graph):
2323
[0, 0, 0, 1]
2424
"""
2525
n = len(graph)
26-
ans = [[graph[i][j] for j in range(n)] for i in range(n)]
26+
ans = [
27+
[graph[i][j] for j in range(n)]
28+
for i in range(n)
29+
]
2730

2831
# Transtive closure of (i, i) will always be 1
2932
for i in range(n):

0 commit comments

Comments
 (0)