feat: Add Travelling Salesman Problem

This commit is contained in:
Mayank17M
2021-09-10 12:52:36 +05:30
parent be341e6a57
commit e8ed350da8

View File

@@ -51,10 +51,10 @@ int TravellingSalesmanProblem(std::vector<std::vector<int>> *cities, int src,
}
//// store minimum weight Hamiltonian Cycle.
int min_path = INT_MAX;
int32_t min_path = INT_MAX;
do {
//// store current Path weight(cost)
int curr_weight = 0;
int32_t curr_weight = 0;
//// compute current path weight
int k = src;