when you are talking abt starting from 1 that means that array is 1
based , right ?
Right.
111
000
000
Up-left element: 1
Choice 3: 0 (number of 0's on the first row) + 1 (number of 1's on the
first column) = 1
Choice 4: 3 (number of 1's on the first row) + 2 (number of 0's on the
first
when you are talking abt starting from 1 that means that array is 1
based , right ?
and how did you get the steps calculated. please can you explain, once
more
take this example, a trivial but albeit will help me explain.
111
000
000
and
011
100
100
if it is feasible for you to reply .
On Dec
i have devised another apporah for same but i would have liked to
understand what terence has said ?
On Sat, Dec 25, 2010 at 3:01 PM, Ankur ankur.kkhur...@gmail.com wrote:
when you are talking abt starting from 1 that means that array is 1
based , right ?
and how did you get the steps
As Amir pointed out:
convert the first row and first column to all zeros
In details:
1. choose operations on first row and first column to make up-left
element 0.
* There are 2 cases, 2 choices for each case:
1. If the up-left element is 0, then
@Prims
Can you please elaborate the problem in detail...
What do you mean by toggling row and column...
1 Interchanging a row with some column ?
2 Changing 0s to 1s and 1s to 0s of that row ?
or Some thing else ?
In both options mentioned above .. no of 1s present in a matrix can not be
Hello Rajan
Suppose we have the following matrix
1 1
0 0
If a toggle operation performed on first row, it will change all 1s to
0s and 0s to 1s which result in the followig matrix
0 0
0 0
It is zero matrix and the result.
Similarly if a toggle operation is performed on column, it will change
Amir
Could you please explain with an example in detail?
On Dec 6, 7:02 pm, Amir hossein Shahriari
amir.hossein.shahri...@gmail.com wrote:
actually a greedy approach for this problem exists:
just convert the first row and first column to all zeros
if after this step matrix is not a complete