dynamic programming question similar to traveling salesman in python
So I just started exploring dynamic programming a little bit more in depth and I have come across a question which I’ve been unable to solve for a while now. I would greatly appreciate any help with it.