&gt; <i>If you really want the single best solution, you&#x27;re stuck with checking all N! solutions.</i><p>No, you&#x27;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!).