Skip to content

Commit 88c8f1e

Browse files
authored
Refine docstring for transitive_closure function
Updated the docstring to improve clarity and fix grammar.
1 parent 2fb4e81 commit 88c8f1e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎matrix/transitive_closure.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
"""
2+
https://en.wikipedia.org/wiki/Transitive_closure#In_graph_theory
3+
https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm
4+
"""
5+
16
def transitive_closure(graph: list[list[int]]) -> list[list[int]]:
27
"""
3-
Computes the transitive closure of a directed graph using the
8+
Compute the transitive closure of a directed graph using the
49
Floyd-Warshall algorithm.
510
611
Args:

0 commit comments

Comments
 (0)