solve · cseongho/Algorithm@fe25753 · GitHub
Skip to content

Commit fe25753

Browse files
committed
solve
1 parent 82e9d0e commit fe25753

6 files changed

Lines changed: 70 additions & 2 deletions

File tree

bin/baekjoon/Q1260/Main.class

2.46 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

src/baekjoon/Q1260/Main.java

Lines changed: 67 additions & 0 deletions

src/study/algorithm/BFS_Queue.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ static void bfs(int node) {
2323
System.out.print(curr + " ");
2424

2525
for(int next = 0; next < N; ++next) {
26-
if(!visited[next] &&Graph[node][next] !=0)
26+
if(!visited[next] &&Graph[curr][next] !=0) {
2727
visited[next] = true;
2828
myqueue.add(next);
29+
}
2930
}
3031
}
3132
}

src/study/algorithm/DFS_stack.java

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)