Google Matrix Question
Anonymous User
2029

Recently I gave a google interview and unable to solve the question

    {0,0,1,0,0,0,0,1,0,0,0,0,0},
    {0,0,0,0,0,0,0,1,1,1,0,0,0},
    {0,1,1,0,1,0,0,0,0,0,0,0,0},
    {0,1,0,0,1,1,1,0,1,0,1,1,0},
    {0,1,0,0,1,0,1,0,1,1,1,0,0},
    {0,0,0,0,1,0,1,0,0,0,1,0,0},
    {0,0,0,0,1,0,1,*1,1*,1,0,0,0},
    {0,0,0,0,0,0,0,**1,1,**0,0,0,0} 
	ANS 4
	```
	 {0,0,1,0,0,0,0,1,0,0,0,0,0},
    {0,0,0,0,0,0,0,1,1,1,0,0,0},
    {0,1,1,0,*1,1,1*,1,0,0,0,0,0},
    {0,1,0,0,*1,1,1*,0,1,0,1,1,0},
    {0,1,0,0,*1,1,1*,0,1,1,1,0,0},
    {0,1,1,1,1,0,0,0,0,0,1,0,0},
    {0,1,1,1,1,0,0,1,1,1,0,0,0},
    {0,1,1,1,0,0,0,1,1,0,0,0,0} 
	```  ANS 9
	
	A hint was given by interviewer if we check for 1 then we have equal number of 1 in rows and column
	I tried DFS but not able to solve
	
	Kindly suggest.
Comments (6)