Coding

Can you give me the simplest way to find the shortest distance for a knight to move from A to B on an infinite chessboard?

Machine Learning Engineer

Meta

Amazon

Reddit

ByteDance

Lyft

Evernote

Did you come across this question in an interview?

  • Can you give me the simplest way to find the shortest distance for a knight to move from A to B on an infinite chessboard?
  • Tell me how you would calculate the shortest distance for a knight on an infinite chessboard to move from A to B.
  • Explain to me how you would determine the shortest distance a knight can move from position A to B on an infinite chessboard.
  • Can you walk me through the process of finding the shortest distance for a knight to move on an infinite chessboard from point A to point B?
  • How would you go about calculating the shortest distance from A to B for a knight on an infinite chessboard?
  • Is there a way to efficiently determine the shortest distance for a knight to move on an infinite chessboard from position A to position B? If so, share that with me.
  • Can you share with me a method to find the shortest distance a knight has to move from point A to point B on an infinite chessboard?
  • Can you explain to me how you would calculate the fewest steps a knight needs to move from position A to position B on an infinite chessboard?
  • Walk me through the steps you would take to determine the shortest distance for a knight to move on an infinite chessboard from A to B.
  • Given an infinite chessboard, find shortest distance for a knight to move from position A to position B.

Interview question asked to Machine Learning Engineers interviewing at LiveRamp, Coursera, Evernote and others: Can you give me the simplest way to find the shortest distance for a knight to move from A to B on an infinite chessboard?.