static boolean findPath(int[][] matrix, int x, int y, int[][] path) {

		if ((x == matrix.length - 1) && (y == matrix[0].length - 1)) {
			path[x][y] = 1;
			return true;
		}
		if (validLocation(matrix, x, y)) {
			path[x][y] = 1;
			if (findPath(matrix, x + 1, y, path)) {
				return true;
			}
			if (findPath(matrix, x, y + 1, path)) {
				return true;
			}
			path[x][y] = 0;
			return false;
		}
		return false;
	}