프로그래머스 무인도 여행 - java


프로그래머스 무인도 여행 - java

import java.util.*; class Solution { int mVisited[][] = null; public int[] solution(String[] maps) { int width = maps[0].length(); int height = maps.length; mVisited = new int[height][width]; ArrayList<Integer> daysCanAliveList = new ArrayList<>(); int daysCanAliveIndex = 0; for (int cursorRow = 0; cursorRow < height; cursorRow++) { for (int cursorCol = 0; cursorCol < width; cursorCol++) { if (mVisited[cursorRow][cursorCol] == 0 && maps[cursorRow].charAt(cursorCol) != 'X') { daysCanAliveList.add...



원문링크 : 프로그래머스 무인도 여행 - java