I'm curious about the question
So basically the question is
Output = Sum of Shifts require in every row, right?
For instance in your example the answer is -1? Because last row has zero 1s? So it's not possible at all
But in this example
Input: ['1001', '0101', '0010']
The answer is 1 as I can move last row on the right and get the last column with all 1s
2nd example
Input: ['1000', '0001', '0010']
The output = 2 (shifting first row once the left & last row once on the right - 1 + 1 = 2)
i.e ['0001', '0001', '0001']
Is my understanding correct?