diff --git "a/alstjr7437/BFS/\354\227\260\352\262\260-\354\232\224\354\206\214\354\235\230-\352\260\234\354\210\230.swift" "b/alstjr7437/BFS/\354\227\260\352\262\260-\354\232\224\354\206\214\354\235\230-\352\260\234\354\210\230.swift" new file mode 100644 index 0000000..9a4bcd1 --- /dev/null +++ "b/alstjr7437/BFS/\354\227\260\352\262\260-\354\232\224\354\206\214\354\235\230-\352\260\234\354\210\230.swift" @@ -0,0 +1,44 @@ +import Foundation + +let input = readLine()!.split(separator: + " ").map{ Int($0)!} + +let n = input[0] , m = input[1] + +var graph : [[Int]] = Array(repeating: [], count: n + 1) +var visited : [Bool] = Array(repeating: false, count: n + 1) +var result : Int = 0 + +for _ in 0..최단 경로 | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/66 | | 19차시 | 2024.03.27 | 문자열 | IOIOI | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/67 | | 20차시 | 2024.04.03 | BFS | 숨바꼭질 | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/70 | -| 21차시 | 2024.04.06 | 비트마스킹 | 집합 | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/74 | \ No newline at end of file +| 21차시 | 2024.04.06 | 비트마스킹 | 집합 | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/74 | +| 22차시 | 2024.04.13 | BFS | 연결 요소의 개수 | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/78 | \ No newline at end of file