...
/Challenge: The Traveling Salesman Problem
Challenge: The Traveling Salesman Problem
In this lesson, you will solve a coding challenge on the famous traveling salesman problem.
We'll cover the following...
Problem statement
You are given a map that has cities on it. All of the cities are connected directly to each other via distinct routes of variable lengths. You, being a salesman, have to travel to each of these cities on a business trip. But your company wants you to be very careful with the travel expenses and wants you to spend the least amount possible. Expenditure is a function of the distance traveled, so you want to minimize the total distance traveled. Find the length of the shortest path to travel all the cities.
Input
You will be given a 2-d matrix, distances
, of size ...