My output is a linear translation from the answer and the array still satisfies all of the conditions. Is there something that I am missing while reading the question?
whitespace matters
I have the same problem
k, I see what’s going on
remove the trailing whitespace/newline solved the problem.