Problem 1339. Travelling Salesman Problem (TSP)
Find a short way through given points. This is the travelling salesman problem. But the solution should be a fast and small function.
Have fun!
Solution Stats
Problem Comments
-
5 Comments
Show
2 older comments
Jan Orwat
on 16 Dec 2015
This problem needs an update due to changes in scoring system in Cody
Rafael S.T. Vieira
on 20 Sep 2020
You need to specify the comparison method when sorting complex numbers. Any change done to the order of elements currently creates an invalid solution (even sorting elements), and I guess the one that you want is 'real'. Or don't use complex numbers and create pair of values [x,y]. I've commented my solution. Futhermore, the function calculateSize no longer exists.
ChrisR
on 30 May 2022
Would someone please fix the test? The function calculateSize does not exist.
Dyuman Joshi
on 30 May 2022
The test suite has been fixed, Chris. You can now attempt the question.
ChrisR
on 31 May 2022
Thanks Dyuman
Solution Comments
Show commentsProblem Recent Solvers34
Suggested Problems
-
17101 Solvers
-
3368 Solvers
-
615 Solvers
-
529 Solvers
-
1040 Solvers
More from this Author3
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!