Available Captures for Rook at Square
Easy71.5% acceptance
This problem has 100.0% frequency at Square.
Problem Description
You are given an `8 x 8` **matrix** representing a chessboard. There is **exactly one** white rook represented by `'R'`, some number of white bishops `'B'`, and some number of black pawns `'p'`. Empty squares are represented by `'.'`. A rook can move any number of squares horizontally or vertically...
Read full problem and hintsTopics
Also asked at 1 company
More Square Questions
Walking Robot Simulation IIMediumWord BreakMediumFalling SquaresHardNumber of Black BlocksMediumCount Nice Pairs in an ArrayMedium
View all Square questions