Skip to content

Commit 3cb8f77

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 82cafab commit 3cb8f77

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

matrix/transitive_closure.py

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

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

0 commit comments

Comments
 (0)