← Questions
Fewest moves for a chess piece to capture the king
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A rectangular board has blocked squares, your piece and the opposing king. Your piece's type decides the directions it may step in, and it can never move onto a blocked square. Return the fewest moves your piece needs to reach the king's square, or report that it cannot.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
