I was recently interviewed by Amazon and the question they asked me was a variation of https://leetcode.com/problems/minimum-knight-moves/
Given a chessboard of dimension N x N where 2<=N<=1000, initial pawn position [x1, y1] and initial knight position [x2, y2], find the minimum number of steps for knight to kill pawn, if it exists. Otherwise return -1.
Because of the statement of the question, I had difficulty understanding whether to treat it as a path finding question (DFS) or a shortest distance problem (BFS).
Solution / ideas for the above would be really helpful.
Thanks!