[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค Lv3] ๊ฐ€์žฅ ๋จผ ๋…ธ๋“œ | ์ž๋ฐ”
ยท
๐Ÿ“ Coding Test/Programmers Lv3
๋ฌธ์ œ๊ฐ€์žฅ ๋จผ ๋…ธ๋“œํ’€์ดimport java.util.*;class Solution { public int solution(int n, int[][] edge) { int answer = 0; int[] visited = new int[n + 1]; ArrayList> graph = new ArrayList(); for(int i = 0; i ()); } for(int i = 0; i > graph, int[] visited, int start) { Queue q = new LinkedList(); q.offer(start); visited[start] = 1; ..