Amazon| phone interview| can anyone help with solution
Anonymous User
612

Given a matrix
Input : [ 1 1 1 1 1 1,
1 1 0 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 0 1 1 1
1 1 1 1 1 1 ]

		 where ever 0 is there all adjacent cellls( 8 directions)  becomes 0's
		 Find if there a path exists from any first column cell to last column cell.
		 
		 output would true in the case as there exists a path
		[ 1 1 1 1 1 1,
		 1 1 0 1 1 1
		 1 1 1 1 1 1
		 **1 1 1 1 1 1**
		 1 1 1 1 1 1
		 1 1 0 1 1 1
		 1 1 1 1 1 1 ]
		 
		 
		 Thanks!
Comments (4)