Skip to content

Commit aa46f1a

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dynamic_programming/travelling_salesman.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def solve(mask: int, pos: int) -> float:
3535
if state in dp:
3636
return dp[state]
3737

38-
minimum = float('inf')
38+
minimum = float("inf")
3939
min_next = -1
4040

4141
for next_city in range(n):
@@ -60,7 +60,7 @@ def solve(mask: int, pos: int) -> float:
6060
for _ in range(n - 1):
6161
next_pos = parent[(mask, pos)]
6262
path.append(next_pos)
63-
mask |= (1 << next_pos)
63+
mask |= 1 << next_pos
6464
pos = next_pos
6565

6666
return optimal_cost, path

0 commit comments

Comments
 (0)