Bird
Raised Fist0

When implementing castling logic, what condition must the squares between the king and rook satisfy?

easy🧠 Conceptual Q2 of Q15
LLD - Design — Chess Game
When implementing castling logic, what condition must the squares between the king and rook satisfy?
AAt least one square must be occupied by a friendly piece
BAll squares between must be unoccupied
CSquares must be under attack by opponent pieces
DOnly the square next to the king must be empty
Step-by-Step Solution
Solution:
  1. Step 1: Recall castling rules

    Castling requires that all squares between the king and rook are empty.
  2. Step 2: Validate squares

    Any piece occupying these squares blocks castling.
  3. Final Answer:

    All squares between must be unoccupied -> Option B
  4. Quick Check:

    Occupied squares prevent castling. [OK]
Quick Trick: Squares between king and rook must be empty [OK]
Common Mistakes:
MISTAKES
  • Allowing castling with pieces between king and rook
  • Ignoring occupancy of squares
  • Assuming only some squares need to be empty

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes