Minimum depot tour cost
A delivery drone must visit every one of n depots exactly once, starting at depot 0 and not needing to return. dist[i][j] is the travel cost between depots i and j (symmetric, non-negative). Return the minimum total travel cost of a route that starts at depot 0 and visits all depots. Constraints: 1 <= n <= 14, 0 <= dist[i][j] <= 10^6, dist[i][i] = 0.
Implement
min_tour_cost(dist: list[list[int]]) → intExamples
in
[[[0,10,15],[10,0,20],[15,20,0]]]out30What a strong answer looks like
State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
0:00 of about 45 min
solution.py
InputExpectedGot
[[[0,10,15],[10,0,20],[15,20,0]]]30not run yetsample