3996. Even Number of Knight Moves
You are given two integer arrays
startandtarget, where each array is of the form[x, y]representing a cell on a standard 8 x 8 chessboard.Return
trueif a knight can move fromstarttotargetin an even number of moves. Otherwise, returnfalse.Note: A valid knight move consists of moving two squares in one direction and one square perpendicular to it. The figure below illustrates all eight possible moves from a cell.
1 | class Solution { |