Comment Comment by vilhelm_s > If you really want the single best solution, you're stuck with checking all N! solutions.No, you're not. There is an exact dynamic programming algorithm that takes O(n^2 2^n) time, which is exponential but much smaller than O(n!). parent vilhelm_s 10 years ago
No, you're not. There is an exact dynamic programming algorithm that takes O(n^2 2^n) time, which is exponential but much smaller than O(n!).