프로그래머스-게임 맵 최단거리; Java
https://programmers.co.kr/learn/courses/30/lessons/1844 코딩테스트 연습 - 게임 맵 최단거리 [[1,0,1,1,1],[1,0,1,0,1],[1,0,1,1,1],[1,1,1,0,1],[0,0,0,0,1]] 11 [[1,0,1,1,1],[1,0,1,0,1],[1,0,1,1,1],[1,1,1,0,0],[0,0,0,0,1]] -1 programmers.co.kr 음 완전 bfs~ import java.util.*; class Solution { static int[] row = {0,0,1,-1}; static int[] col = {1,-1,0,0}; //bfs public int solution(int[][] maps) { int answer = -1; int N..
2022. 3. 7.