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

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton