import java.util.*; class Solution { static int[] dx = {-1, 1, 0 , 0}; static int[] dy = {0, 0, -1, 1}; public int solution(int[][] maps) { int answer = 0; int[][] ch = new int[maps.length][maps[0].length]; bfs(maps, ch); answer = ch[maps.length-1][maps[0].length-1]; if(answer == 0){ answer = -1; }else{ return answer; } return answer; } public static void bfs(int[][] maps, int[][] ch){ Queue que..