Queen's move - 02 - MATLAB Cody - MATLAB Central

Problem 45237. Queen's move - 02

Difficulty:Rate

In continuation with the problem-45236 ... In the previous problem, it was assumed that there were no other chess pieces on the board... Now lets assume there is a number of king present on the board whose location is given in an array p . Now, check for the validity of Queen's moves.

  1. x={'Qd1','Qh1','Qh8','Qd5','Qg5','Qc5','Qa7','Qf2','Qe7','Qh7'}
  2. p={'Kd4','Ke5','Kh7','Ke7'}

output=[1,1,0,1,0,1,1,0,0,0]

kindly see this problem for understanding https://www.mathworks.com/matlabcentral/cody/problems/45236-queen-s-move

Solution Stats

77.78% Correct | 22.22% Incorrect
Last Solution submitted on Apr 18, 2023

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Group

Guess the Logic! Image
Guess the Logic!
  • 17 Problems
  • 241 Finishers

Problem Recent Solvers7

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!