3 ms·
Ha, well I used to teach Prolog and yes, you could solve it using Prolog but I think it would be horribly slow without Knuth's magic algorithm.
by daoudc 3y ago
Ha, well I used to teach Prolog and yes, you could solve it using Prolog but I think it would be horribly slow without Knuth's magic algorithm.
- qsort 3y agoI think in this specific case the size is small enough that you could handle it -- 9! ~= 360,000. But yeah, your point is well taken. On the logic programming side, ASP is probably a better fit.