Back to problems

Chinese Chess Horse Reachability with Blocked Legs

Algorithm · Ebay · Medium

Problem You are given a standard Chinese-chess board with 9 columns and 10 rows. A horse piece starts at a given square, and you must decide whether it can reach a target square. Some squares on the board are blocked (obstacles). The horse cannot land on a blocked square, and its movement is restricted by a special rule: the "horse leg" block. Horse Movement The horse moves in an L-shape, just like a knight in Western chess, but with an extra blocking condition. The possible…

Checking your access…