Longest Chess Knight Path Problem

Revision en2, by sauban, 2019-02-04 22:13:27

So I came across this problem, and I could not solve it. Can I have some hints?

Given a n x m chess board, a starting position (r1, c1) and a target position (r2, c2), you have to output the maximum number of moves a chess knight can make to get to the target position. Each cell can only be visited once.

n and m were ~400.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English sauban 2019-02-04 22:13:27 36 Tiny change: ' position.\n\nn and' -> ' position. Each cell can only be visited once.\n\nn and'
en1 English sauban 2019-02-04 21:07:23 327 Initial revision (published)