Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Day 425 #858

Closed
vaskoz opened this issue Jan 19, 2020 · 1 comment · Fixed by #859
Closed

Day 425 #858

vaskoz opened this issue Jan 19, 2020 · 1 comment · Fixed by #859
Assignees

Comments

@vaskoz
Copy link
Owner

vaskoz commented Jan 19, 2020

Good morning! Here's your coding interview problem for today.

This problem was asked by Oracle.

You are presented with an 8 by 8 matrix representing the positions of pieces on a chess board. The only pieces on the board are the black king and various white pieces. Given this matrix, determine whether the king is in check.

For details on how each piece moves, see here.

For example, given the following matrix:

...K....
........
.B......
......P.
.......R
..N.....
........
.....Q..

You should return True, since the bishop is attacking the king diagonally.

@vaskoz vaskoz self-assigned this Jan 19, 2020
@vaskoz
Copy link
Owner Author

vaskoz commented Jan 19, 2020

Identical to Day 267: #543

@vaskoz vaskoz mentioned this issue Jan 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant