programmers.co.kr/learn/courses/30/lessons/49189 코딩테스트 연습 - 가장 먼 노드 6 [[3, 6], [4, 3], [3, 2], [1, 3], [1, 2], [2, 4], [5, 2]] 3 programmers.co.kr 전형적인 bfs 문제 같았다 import java.util.*; class Solution { public int solution(int n, int[][] edge) { int answer = 0; int maxValue = 0; int[] nodeLength = new int[n+1]; boolean[][] adj = new boolean [n+1][n+1]; for(int i =0;i