I don't understand the question, or examples. The "number of consecutive "1's" between "-1's" is what it is. It's determined by A in advance and presumably A was created without regard to any N.
And for the outputs, you are changing the bottom of the middle column even though those 1's are not between ANY -1's. What's the correct rule?
Best Answer