Problem 45236. Queen's move
given a number of consecutive moves of queen, check for their validity based on their previous position.... but remember if u get an invalid move - u need check for the next move's validity based on the last valid position.....
- x={'Qd1','Qd5','Qf7','Qa8','Qg8'}
- y=[1,1,1,0,1]
Solution Stats
Problem Comments
-
1 Comment
Rafael S.T. Vieira
on 2 Nov 2022
This problem assumes the first position is always valid, or there should be a default position if the first is invalid.
Solution Comments
Show commentsProblem Recent Solvers16
Suggested Problems
-
2239 Solvers
-
Find state names that start with the letter N
1426 Solvers
-
Count from 0 to N^M in base N.
239 Solvers
-
Number of 1s in a binary string
10886 Solvers
-
Given a matrix, return the last eigen value
231 Solvers
More from this Author174
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!