Skip to content

Commit e4cb145

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

graphs/floyd_warshall.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
Wiki page:- <https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm>
1313
"""
1414

15+
1516
def floyd_warshall(graph, n):
1617
"""
1718
Returns the shortest distance between all pairs of nodes
@@ -42,7 +43,8 @@ def floyd_warshall(graph, n):
4243
distance[i][j] = min(distance[i][j], distance[i][k] + distance[k][j])
4344
return distance
4445

45-
if __name__ == '__main__':
46+
47+
if __name__ == "__main__":
4648
"""
4749
Layout of G:-
4850
2 2 1 1 5

0 commit comments

Comments
 (0)