게임 맵 최단거리 ( Level 2, JavaScript, 찾아라 프로그래밍 마에스터 )
게임 맵 최단거리 ( Level 2 ) Programmers 찾아라 프로그래밍 마에스터 ( JavaScript ) 문제 링크 나의 풀이 function solution(s) { const dx = [0,0,1,-1]; const dy = [1,-1,0,0]; const queue = [[0,0,1]]; while ( queue.length ) { const cur = queue.shift(); if ( cur[0] === maps.length - 1 && cur[1] === maps[0].length - 1) return cur[2] for(let i=0;i= 0 && yy >= 0 && xx < maps[0].length && yy < maps.length && maps[yy][xx] === 1 ) {..