Traveling salesman problem using dynamic programming

Please help me - How to solve Spoj BCTSP2 (traveling salesman problem) using dp?

Example
Input:
4
0 20 35 42
20 0 34 30
35 34 0 12
42 30 12 0

Output:
97

Problem link

Oh GOD! I have already told you many and many times that please don’t ask such questions that can easily be googled. Why don’t you understand this small point? Should i tell you in Any other language?

2 Likes

Did you check here? http://www.geeksforgeeks.org/travelling-salesman-problem-set-1/

1 Like

yeap…Please check the problem link…

No need other language. I search google but could not find the solution. Spoj BCTSP2 : http://www.spoj.com/problems/BCTSP2/#
Please check…

1 Like

Is it just me or the problem isn’t in English? :confused:

you can translate into English.

Full problem statements : http://ideone.com/i6UrQe

Read the link that @vijju123 posted, try to understand what’s written and implement this problem yourself, you’ll learn more, copy pasting won’t help you.

1 Like

but it is something hard to understand.

I can try to code :


[1] 

But it may not be efficient.
  [1]: http://ideone.com/gSWc2D
1 Like
//