Skip to content

Commit 84e449c

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

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

networking_flow/ford_fulkerson.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
]
2020

2121

22-
def breadth_first_search(
23-
graph: list, source: int, sink: int, parents: list
24-
) -> bool:
22+
def breadth_first_search(graph: list, source: int, sink: int, parents: list) -> bool:
2523
"""
2624
This function returns True if there is a node that has not iterated.
2725
@@ -99,7 +97,7 @@ def ford_fulkerson(graph: list, source: int, sink: int) -> int:
9997
# Augment the flow while there is a path from source to sink
10098
while breadth_first_search(residual_graph, source, sink, parents):
10199
# Find the minimum residual capacity along the path
102-
path_flow = float('inf')
100+
path_flow = float("inf")
103101
current_node = sink
104102

105103
# Find the minimum capacity in the path
@@ -126,4 +124,4 @@ def ford_fulkerson(graph: list, source: int, sink: int) -> int:
126124
from doctest import testmod
127125

128126
testmod()
129-
print(f"{ford_fulkerson(graph, source=0, sink=5) = }")
127+
print(f"{ford_fulkerson(graph, source=0, sink=5) = }")

0 commit comments

Comments
 (0)