Modified DP for TSP