프로그래머스 3단계 : 경주로 건설 (Java 자바)
import java.util.*; public class Solution { public int solution(int[][] board) { int[] dy = {-1, 1, 0, 0}, dx = {0, 0, -1, 1}; int N = board.length; int[][][] cost = new int[N][N][4]; for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) Arrays.fill(cost[i][j], Integer.MAX_VALUE); Queue queue = new LinkedList(); queue.add(new int[]{0, 0, 0, 1}); queue.add(new int[]{0, 0, 0, 3}); while (!queue...