[ 프로그래머스 ] #1829 : 카카오 프렌즈 컬러링북 - JAVA
🔗카카오 프렌즈 컬러링북import java.util.*;class Solution { public int[] solution(int m, int n, int[][] picture) { // 방문 체크 배열 boolean[][] visited = new boolean[m][n]; int[] result = new int[2]; // 결과 저장 [영역 수, 최대 영역 크기] // 모든 좌표 탐색 for (int i = 0; i queue = new LinkedList(); queue.offer(new int[]{cx, cy}); visited[cx][cy] = true; int[] dx = {1, ..