Skip to content

Commit 20c297f

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

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dynamic_programming/travelling_salesman_problem.py

+3
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ def visit(city: int, mask: int) -> int:
4848
min_cost = min(min_cost, new_cost)
4949
memo[city][mask] = int(min_cost) # Store result as an integer
5050
return memo[city][mask] # Return the cached result
51+
5152
return visit(0, 1) # Start from city 0 with city 0 visited
5253

54+
5355
if __name__ == "__main__":
5456
import doctest
57+
5558
doctest.testmod()

0 commit comments

Comments
 (0)