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));
}
걍 코드 짧은 아래쪽이 더 나을라나?
한줄차이밖에안나는데 닥전
디씨에 코드를 쓰려면 무조건 스샷을 떠야 함. 금지어도 많고 공백이고 탭이고 지 꼴리는대로 변형해버려서.
그리고 js 는 jit가 LGBTQI+ 이라서 continue 는 가능한 쓰지 말아야 함.
당연히 후자지..