Problem 45355. Connect Four - 03
Previous Problem https://www.mathworks.com/matlabcentral/cody/problems/45354-connect-four-01 https://www.mathworks.com/matlabcentral/cody/problems/45356-connect-four-02
In addition to previous problem
In this case, there can be empty places on the board represented by 0.
Also no of consecutive elements can be more than 4.
Solution Stats
Problem Comments
-
5 Comments
@Asif Newaz, in the test4, I get
1-8
2-9
Maybe I got it wrong, I will try again
@Asif Newaz, ok , the test is right, I got it wrong
I likely had the same confusion as Binbin: [1 1 1 1 1] counts as one winning string for Player 1 (not two), whereas [1 1 1 1 1 1 1 1 1] counts as two (not one or six).
Solution Comments
Show commentsProblem Recent Solvers5
Suggested Problems
-
Find the two most distant points
2885 Solvers
-
3442 Solvers
-
Poker Series 01: isStraightFlush
121 Solvers
-
Replace all zeros and NaNs in a matrix with the string 'error'
100 Solvers
-
268 Solvers
More from this Author165
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!