Tap here to switch tabs
Problem
Submissions

Problem: Even Number of Knight Moves

med
30 min
Try to solve the Even Number of Knight Moves problem.

Statement

You are given two integer arrays start and target of length 22, representing the coordinates of a knight on an 8imes88 imes 8 chessboard.

Return true if the knight can reach target from start in an even number of moves, or false otherwise.

Note: In a single move, a knight can move 22 squares in one direction horizontally or vertically and 11 square in the perpendicular direction.

Constraints:

  • start.length ==== target.length ==2== 2

  • 0≤0 \leq start[i], target[i] ≤7\leq 7

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Even Number of Knight Moves

med
30 min
Try to solve the Even Number of Knight Moves problem.

Statement

You are given two integer arrays start and target of length 22, representing the coordinates of a knight on an 8imes88 imes 8 chessboard.

Return true if the knight can reach target from start in an even number of moves, or false otherwise.

Note: In a single move, a knight can move 22 squares in one direction horizontally or vertically and 11 square in the perpendicular direction.

Constraints:

  • start.length ==== target.length ==2== 2

  • 0≤0 \leq start[i], target[i] ≤7\leq 7