Graph Theory37 sections · 1633 units
Open in Course

Problem - Knight's Tour

CSES 1689 - Backtracking.

Problem: Given an 8×88 \times 8 chessboard, find a sequence of knight moves that visits every square exactly once, starting from a given position.

Link: CSES 1689

Constraints:

  • Fixed 8×88 \times 8 board
  • Knight moves in L-shape: 22 squares in one direction, 11 in perpendicular

Note: This is also a Hamiltonian path problem, but on a specific graph structure.