Maze matrix
int maze [ ] [ ] = { { 1 , 0 , 1 , 1 , 0 } , { 1 , 1 , 1 , 0 , 1 } , { 0 , 1 , 0 , 1 , 1 } , { 1 , 1 , 1 , 1 , 1 } } ; if ( isReachable ( maze ) ) { System . out . println ( "Path Found!NEW_LINE"); } else System . out . println ( "No Path Found!NEW_LINE"); } private static void setVisited ( boolean b ) { for ( int i = 0 ; i < visited . length ; i ++ ) { for ( int j = 0 ; j < visited [ i ] . length ; j ++ ) { visited [ i ] [ j ] = b ; } } } private static boolean isReachable ( int maze [ ] [ ] ) {