1. 

for(Node next : graph.get(current.index)) {
if(visit[next.index])
continue;

queue.offer(new Node(next.index, next.weight));
}


2.

for(Node next : graph.get(current.index)) {
if(!visit[next.index])
queue.offer(new Node(next.index, next.weight));
}


걍 코드 짧은 아래쪽이 더 나을라나?