Cody

Solution 2066920

Submitted on 23 Dec 2019 by Binbin Qi
  • Size: 78
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x = {'Qd1','Qd5','Qf7','Qa8','Qg8'}; y_correct = [1,1,1,0,1]; assert(isequal(Queen_move(x),y_correct))

2   Pass
x = {'Qd1','Qd5','Qf7','Qa8','Qc7'}; y_correct = [1,1,1,0,1]; assert(isequal(Queen_move(x),y_correct))

3   Pass
x={'Qh1','Qg5','Qe6','Qe2','Qb3','Qd5','Qh7'}; y_correct = [1,0,0,0,0,1,0]; assert(isequal(Queen_move(x),y_correct))