๋ชฉ๋ก๋ฐ”์ด๋Ÿฌ์Šค (1)

SJ_Koding

๊ทธ๋ž˜ํ”„ ์—ฐ์Šต (3) - ๋ฐ”์ด๋Ÿฌ์Šค (๋ฐฑ์ค€ 2606)

์ €๋ฒˆ DFS, BFS๋ฌธ์ œ๋ณด๋‹ค ๋”์šฑ ์‰ฌ์šด ์‹ค๋ฒ„3. DFS๋กœ ๋ฌธ์ œ๋ฅผ ํ’€์–ด๋ณด์•˜๊ณ  ์ด์ „ ๊ฒŒ์‹œ๊ธ€์˜ ๋ฐฉ๋ฒ•๊ณผ ๋งค์šฐ ์œ ์‚ฌํ•˜๋‹ค. 2023.11.08 - [Algorithm/Graph] - ๊ทธ๋ž˜ํ”„ ์—ฐ์Šต (2) - DFS์™€ BFS (๋ฐฑ์ค€ 1260) ๊ทธ๋ž˜ํ”„ ์—ฐ์Šต (2) - DFS์™€ BFS (๋ฐฑ์ค€ 1260) https://www.acmicpc.net/problem/1260 1260๋ฒˆ: DFS์™€ BFS ์ฒซ์งธ ์ค„์— ์ •์ ์˜ ๊ฐœ์ˆ˜ N(1 ≤ N ≤ 1,000), ๊ฐ„์„ ์˜ ๊ฐœ์ˆ˜ M(1 ≤ M ≤ 10,000), ํƒ์ƒ‰์„ ์‹œ์ž‘ํ•  ์ •์ ์˜ ๋ฒˆํ˜ธ V๊ฐ€ ์ฃผ์–ด์ง„๋‹ค. ๋‹ค์Œ M๊ฐœ์˜ ์ค„์—๋Š” ๊ฐ„์„ ์ด ์—ฐ๊ฒฐํ•˜๋Š” sjkoding.tistory.com ๋ฌธ์ œ ์‹ ์ข… ๋ฐ”์ด๋Ÿฌ์Šค์ธ ์›œ ๋ฐ”์ด๋Ÿฌ์Šค๋Š” ๋„คํŠธ์›Œํฌ๋ฅผ ํ†ตํ•ด ์ „ํŒŒ๋œ๋‹ค. ํ•œ ์ปดํ“จํ„ฐ๊ฐ€ ์›œ ๋ฐ”์ด๋Ÿฌ์Šค์— ๊ฑธ๋ฆฌ๋ฉด ๊ทธ ์ปดํ“จํ„ฐ์™€ ๋„คํŠธ..

Algorithm/Graph 2023. 11. 8. 15:08