Alec Gasperian submitted a Comment to Solution 849419 Not sure why this solution gets marked as incorrect. I haven't been able to stump it. Can you find something wrong?
function [tf] = pattern_recognition1(array)
L = length(array);
one=array(1:3:L); two=array(2:3:L); three=array(3:3:L);
check = ((length(one) + length(two) = length(three)) /length(one);
c1 = all(one == one(1)); c2 = all(two == two(1)); c3 = all(three == three(1));
if c1 ==1 && c2 == 1 && c3 == 1
if check == 3;
tf = 1;
else tf = 0;
end
else tf = 0;
end
on 11 Mar 2016 |
Alec Gasperian received Commenter badge for Solution 849419 on 11 Mar 2016 |
Alec Gasperian submitted Solution 849383 to Problem 167. Pizza! on 11 Mar 2016 |
Alec Gasperian submitted Solution 849381 to Problem 167. Pizza! on 11 Mar 2016 |
Alec Gasperian submitted Solution 849376 to Problem 1. Times 2 - START HERE on 11 Mar 2016 |
Alec Gasperian received Solver badge for Solution 849376 on 11 Mar 2016 |