Better HN
topnewbestaskshowjobs
Log inSign up

salvipeter

1 karma · joined Mar 18, 2019 (7y ago) · 1 submissions

Submissions

comment 3y ago · link · parent

If you drop the sequential restriction, this becomes a pretty neat shortest path problem, essentially the same as LeetCode 847, but the simple dynamic programming approach does not work here (too much memory needed). It can be transformed to TSP, though, which gives an optimal solution (using Concorde) of just 46 moves: http://directory.iit.bme.hu/~salvi/archive/snippets/knight/k...