Skip to content

Commit d7134b0

Browse files
authored
Change return type of travelling_salesman to float
1 parent 4eb73b6 commit d7134b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dynamic_programming/travelling_sales_person.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import functools
2121

2222

23-
def travelling_salesman(cost_matrix: list[list[int]]) -> int:
23+
def travelling_salesman(cost_matrix: list[list[int]]) -> float:
2424
"""
2525
Returns the minimum travel cost for visiting all cities and returning
2626
to the starting city (0-indexed), using the Held Karp DP approach.

0 commit comments

Comments
 (0)